@frogbotai/piece-telegram-bot 0.22.0 → 0.23.0

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.
package/dist/index.d.ts CHANGED
@@ -1,46 +1,1321 @@
1
- import { type PieceFactoryConfig } from 'frogbot/pieces';
2
- export declare const telegramBotActions: readonly ["send_text_message", "send_media", "send_document", "send_location", "edit_message_text", "get_chat"];
1
+ import type { z } from 'zod';
2
+ import { createTelegramBotClient, type TelegramBotClient } from './client.js';
3
+ import { verifyTelegramWebhook } from './webhook.js';
4
+ export declare const telegramBotActions: readonly ["sendTextMessage", "sendMedia", "sendDocument", "sendAudio", "sendLocation", "sendMediaGroup", "sendPoll", "sendChatAction", "editMessageText", "deleteMessage", "forwardMessage", "pinMessage", "unpinMessage", "getChat", "getChatMember", "getFile", "createInviteLink", "answerCallbackQuery", "customApiCall"];
5
+ export declare const telegramBotTriggers: readonly ["newUpdate"];
3
6
  export declare const telegramBotScopes: readonly [];
4
- export declare function createTelegramBot(config?: PieceFactoryConfig): import("frogbot/pieces").Piece & {
5
- /** Send Text Message: Send a text message through a Telegram bot */
6
- sendTextMessage: import("node_modules/frogbot/dist/tools/types").AnyTool;
7
- /** Send Media: Send a media message (photo, video, sticker, GIF) through a Telegram bot */
8
- sendMedia: import("node_modules/frogbot/dist/tools/types").AnyTool;
9
- /** Send Document: Send a generic file (document) to a Telegram chat */
10
- sendDocument: import("node_modules/frogbot/dist/tools/types").AnyTool;
11
- /** Send Audio: Send an audio file to a Telegram chat (.MP3/.M4A — shown in the music player) */
12
- sendAudio: import("node_modules/frogbot/dist/tools/types").AnyTool;
13
- /** Send Location: Send a geographic location (latitude/longitude) to a Telegram chat */
14
- sendLocation: import("node_modules/frogbot/dist/tools/types").AnyTool;
15
- /** Send Media Group: Send a group of 2–10 photos, videos, documents or audios as an album to a chat */
16
- sendMediaGroup: import("node_modules/frogbot/dist/tools/types").AnyTool;
17
- /** Send Poll: Send a native Telegram poll (regular or quiz) to a chat */
18
- sendPoll: import("node_modules/frogbot/dist/tools/types").AnyTool;
19
- /** Send Chat Action: Show a status (typing, uploading photo, recording voice, etc.) on behalf of the bot in a chat. The status is shown for up to 5 seconds. */
20
- sendChatAction: import("node_modules/frogbot/dist/tools/types").AnyTool;
21
- /** Edit Message Text: Edit the text of a previously sent message or an inline message */
22
- editMessageText: import("node_modules/frogbot/dist/tools/types").AnyTool;
23
- /** Delete Message: Delete a message sent in a chat. Bots can delete their own messages and messages in groups where they are admins. */
24
- deleteMessage: import("node_modules/frogbot/dist/tools/types").AnyTool;
25
- /** Forward Message: Forward a message from one chat to another */
26
- forwardMessage: import("node_modules/frogbot/dist/tools/types").AnyTool;
27
- /** Pin Message: Pin a message in a chat. The bot must be an administrator in the chat for this to work. */
28
- pinMessage: import("node_modules/frogbot/dist/tools/types").AnyTool;
29
- /** Unpin Message: Unpin a message in a chat. Leave Message Id empty to unpin the most recent pinned message. */
30
- unpinMessage: import("node_modules/frogbot/dist/tools/types").AnyTool;
31
- /** Get Chat: Get up-to-date information about a chat (name, description, photo, member count, etc.) */
32
- getChat: import("node_modules/frogbot/dist/tools/types").AnyTool;
33
- /** Get Chat Member: Get member info (or null) for the provided chat id and user id */
34
- getChatMember: import("node_modules/frogbot/dist/tools/types").AnyTool;
35
- /** Get File: Get file information and optionally download a file from Telegram */
36
- getFile: import("node_modules/frogbot/dist/tools/types").AnyTool;
37
- /** Create Invite Link: Create an invite link for a chat */
38
- createInviteLink: import("node_modules/frogbot/dist/tools/types").AnyTool;
39
- /** Answer Callback Query: Respond to a callback query sent by an inline keyboard button. Shows a notification or alert to the user. */
40
- answerCallbackQuery: import("node_modules/frogbot/dist/tools/types").AnyTool;
41
- /** Request Approval Message: Send an approval message to a chat and wait until the message is approved or disapproved */
42
- requestApprovalMessage: import("node_modules/frogbot/dist/tools/types").AnyTool;
43
- /** Custom API Call: Make a custom API call to a specific endpoint */
44
- customApiCall: import("node_modules/frogbot/dist/tools/types").AnyTool;
45
- };
7
+ export declare const createTelegramBot: import("frogbot").PieceFactory<{
8
+ readonly slug: "telegramBot";
9
+ readonly label: "Telegram Bot";
10
+ readonly admin: {
11
+ readonly description: "Build chatbots and respond to Telegram updates";
12
+ readonly group: "Communication";
13
+ };
14
+ readonly auth: z.ZodObject<{
15
+ botToken: z.ZodString;
16
+ }, z.core.$strip>;
17
+ readonly options: z.ZodObject<{
18
+ webhookSecret: z.ZodOptional<z.ZodString>;
19
+ botUsername: z.ZodOptional<z.ZodString>;
20
+ allowedUserIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
21
+ }, z.core.$strip>;
22
+ readonly client: typeof createTelegramBotClient;
23
+ readonly webhook: {
24
+ verify: typeof verifyTelegramWebhook;
25
+ parse(): {
26
+ event: string;
27
+ };
28
+ };
29
+ readonly channel: {
30
+ adapter({ auth, options }: {
31
+ auth: {
32
+ botToken: string;
33
+ };
34
+ options: {
35
+ webhookSecret?: string | undefined;
36
+ botUsername?: string | undefined;
37
+ allowedUserIds?: string[] | undefined;
38
+ };
39
+ }): import("@chat-adapter/telegram").TelegramAdapter;
40
+ identity(): Promise<null>;
41
+ };
42
+ readonly actions: readonly [import("frogbot").PieceActionDefinition<z.ZodObject<{
43
+ replyToMessageId: z.ZodOptional<z.ZodNumber>;
44
+ replyMarkup: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
45
+ messageThreadId: z.ZodOptional<z.ZodNumber>;
46
+ disableNotification: z.ZodDefault<z.ZodBoolean>;
47
+ protectContent: z.ZodDefault<z.ZodBoolean>;
48
+ chatId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
49
+ message: z.ZodString;
50
+ parseMode: z.ZodDefault<z.ZodEnum<{
51
+ MarkdownV2: "MarkdownV2";
52
+ HTML: "HTML";
53
+ None: "None";
54
+ }>>;
55
+ disableWebPagePreview: z.ZodDefault<z.ZodBoolean>;
56
+ }, z.core.$strip>, z.ZodObject<{
57
+ ok: z.ZodLiteral<true>;
58
+ result: z.ZodOptional<z.ZodUnknown>;
59
+ }, z.core.$loose>, object, {
60
+ fileUrl(path: string): string;
61
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
62
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
63
+ downloadFile(path: string): Promise<string>;
64
+ }>, {
65
+ run({ client, input, req }: import("frogbot").PieceRunArgs<{
66
+ [x: string]: unknown;
67
+ }, object, TelegramBotClient>): Promise<{
68
+ [x: string]: unknown;
69
+ ok: true;
70
+ result?: unknown;
71
+ }>;
72
+ slug: string;
73
+ label?: string;
74
+ description: string;
75
+ input: z.ZodObject<{
76
+ replyToMessageId: z.ZodOptional<z.ZodNumber>;
77
+ replyMarkup: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
78
+ messageThreadId: z.ZodOptional<z.ZodNumber>;
79
+ disableNotification: z.ZodDefault<z.ZodBoolean>;
80
+ protectContent: z.ZodDefault<z.ZodBoolean>;
81
+ chatId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
82
+ mediaType: z.ZodEnum<{
83
+ photo: "photo";
84
+ video: "video";
85
+ sticker: "sticker";
86
+ animation: "animation";
87
+ }>;
88
+ media: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
89
+ fileId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
90
+ name: z.ZodOptional<z.ZodString>;
91
+ }, z.core.$strip>]>;
92
+ message: z.ZodOptional<z.ZodString>;
93
+ parseMode: z.ZodDefault<z.ZodEnum<{
94
+ MarkdownV2: "MarkdownV2";
95
+ HTML: "HTML";
96
+ None: "None";
97
+ }>>;
98
+ }, z.core.$strip>;
99
+ output?: z.ZodObject<{
100
+ ok: z.ZodLiteral<true>;
101
+ result: z.ZodOptional<z.ZodUnknown>;
102
+ }, z.core.$loose> | undefined;
103
+ idempotent?: boolean;
104
+ options?: Partial<{
105
+ disableNotification: (args: {
106
+ input: Partial<{
107
+ disableNotification: boolean;
108
+ protectContent: boolean;
109
+ chatId: string | number;
110
+ mediaType: "photo" | "video" | "sticker" | "animation";
111
+ media: string | {
112
+ fileId: string | number;
113
+ name?: string | undefined;
114
+ };
115
+ parseMode: "MarkdownV2" | "HTML" | "None";
116
+ replyToMessageId?: number | undefined;
117
+ replyMarkup?: Record<string, unknown> | undefined;
118
+ messageThreadId?: number | undefined;
119
+ message?: string | undefined;
120
+ }>;
121
+ client: {
122
+ fileUrl(path: string): string;
123
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
124
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
125
+ downloadFile(path: string): Promise<string>;
126
+ };
127
+ options: object;
128
+ req: import("frogbot").FrogbotRequest;
129
+ }) => Promise<import("frogbot").PieceOption[]>;
130
+ protectContent: (args: {
131
+ input: Partial<{
132
+ disableNotification: boolean;
133
+ protectContent: boolean;
134
+ chatId: string | number;
135
+ mediaType: "photo" | "video" | "sticker" | "animation";
136
+ media: string | {
137
+ fileId: string | number;
138
+ name?: string | undefined;
139
+ };
140
+ parseMode: "MarkdownV2" | "HTML" | "None";
141
+ replyToMessageId?: number | undefined;
142
+ replyMarkup?: Record<string, unknown> | undefined;
143
+ messageThreadId?: number | undefined;
144
+ message?: string | undefined;
145
+ }>;
146
+ client: {
147
+ fileUrl(path: string): string;
148
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
149
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
150
+ downloadFile(path: string): Promise<string>;
151
+ };
152
+ options: object;
153
+ req: import("frogbot").FrogbotRequest;
154
+ }) => Promise<import("frogbot").PieceOption[]>;
155
+ chatId: (args: {
156
+ input: Partial<{
157
+ disableNotification: boolean;
158
+ protectContent: boolean;
159
+ chatId: string | number;
160
+ mediaType: "photo" | "video" | "sticker" | "animation";
161
+ media: string | {
162
+ fileId: string | number;
163
+ name?: string | undefined;
164
+ };
165
+ parseMode: "MarkdownV2" | "HTML" | "None";
166
+ replyToMessageId?: number | undefined;
167
+ replyMarkup?: Record<string, unknown> | undefined;
168
+ messageThreadId?: number | undefined;
169
+ message?: string | undefined;
170
+ }>;
171
+ client: {
172
+ fileUrl(path: string): string;
173
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
174
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
175
+ downloadFile(path: string): Promise<string>;
176
+ };
177
+ options: object;
178
+ req: import("frogbot").FrogbotRequest;
179
+ }) => Promise<import("frogbot").PieceOption[]>;
180
+ mediaType: (args: {
181
+ input: Partial<{
182
+ disableNotification: boolean;
183
+ protectContent: boolean;
184
+ chatId: string | number;
185
+ mediaType: "photo" | "video" | "sticker" | "animation";
186
+ media: string | {
187
+ fileId: string | number;
188
+ name?: string | undefined;
189
+ };
190
+ parseMode: "MarkdownV2" | "HTML" | "None";
191
+ replyToMessageId?: number | undefined;
192
+ replyMarkup?: Record<string, unknown> | undefined;
193
+ messageThreadId?: number | undefined;
194
+ message?: string | undefined;
195
+ }>;
196
+ client: {
197
+ fileUrl(path: string): string;
198
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
199
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
200
+ downloadFile(path: string): Promise<string>;
201
+ };
202
+ options: object;
203
+ req: import("frogbot").FrogbotRequest;
204
+ }) => Promise<import("frogbot").PieceOption[]>;
205
+ media: (args: {
206
+ input: Partial<{
207
+ disableNotification: boolean;
208
+ protectContent: boolean;
209
+ chatId: string | number;
210
+ mediaType: "photo" | "video" | "sticker" | "animation";
211
+ media: string | {
212
+ fileId: string | number;
213
+ name?: string | undefined;
214
+ };
215
+ parseMode: "MarkdownV2" | "HTML" | "None";
216
+ replyToMessageId?: number | undefined;
217
+ replyMarkup?: Record<string, unknown> | undefined;
218
+ messageThreadId?: number | undefined;
219
+ message?: string | undefined;
220
+ }>;
221
+ client: {
222
+ fileUrl(path: string): string;
223
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
224
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
225
+ downloadFile(path: string): Promise<string>;
226
+ };
227
+ options: object;
228
+ req: import("frogbot").FrogbotRequest;
229
+ }) => Promise<import("frogbot").PieceOption[]>;
230
+ parseMode: (args: {
231
+ input: Partial<{
232
+ disableNotification: boolean;
233
+ protectContent: boolean;
234
+ chatId: string | number;
235
+ mediaType: "photo" | "video" | "sticker" | "animation";
236
+ media: string | {
237
+ fileId: string | number;
238
+ name?: string | undefined;
239
+ };
240
+ parseMode: "MarkdownV2" | "HTML" | "None";
241
+ replyToMessageId?: number | undefined;
242
+ replyMarkup?: Record<string, unknown> | undefined;
243
+ messageThreadId?: number | undefined;
244
+ message?: string | undefined;
245
+ }>;
246
+ client: {
247
+ fileUrl(path: string): string;
248
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
249
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
250
+ downloadFile(path: string): Promise<string>;
251
+ };
252
+ options: object;
253
+ req: import("frogbot").FrogbotRequest;
254
+ }) => Promise<import("frogbot").PieceOption[]>;
255
+ replyToMessageId?: ((args: {
256
+ input: Partial<{
257
+ disableNotification: boolean;
258
+ protectContent: boolean;
259
+ chatId: string | number;
260
+ mediaType: "photo" | "video" | "sticker" | "animation";
261
+ media: string | {
262
+ fileId: string | number;
263
+ name?: string | undefined;
264
+ };
265
+ parseMode: "MarkdownV2" | "HTML" | "None";
266
+ replyToMessageId?: number | undefined;
267
+ replyMarkup?: Record<string, unknown> | undefined;
268
+ messageThreadId?: number | undefined;
269
+ message?: string | undefined;
270
+ }>;
271
+ client: {
272
+ fileUrl(path: string): string;
273
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
274
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
275
+ downloadFile(path: string): Promise<string>;
276
+ };
277
+ options: object;
278
+ req: import("frogbot").FrogbotRequest;
279
+ }) => Promise<import("frogbot").PieceOption[]>) | undefined;
280
+ replyMarkup?: ((args: {
281
+ input: Partial<{
282
+ disableNotification: boolean;
283
+ protectContent: boolean;
284
+ chatId: string | number;
285
+ mediaType: "photo" | "video" | "sticker" | "animation";
286
+ media: string | {
287
+ fileId: string | number;
288
+ name?: string | undefined;
289
+ };
290
+ parseMode: "MarkdownV2" | "HTML" | "None";
291
+ replyToMessageId?: number | undefined;
292
+ replyMarkup?: Record<string, unknown> | undefined;
293
+ messageThreadId?: number | undefined;
294
+ message?: string | undefined;
295
+ }>;
296
+ client: {
297
+ fileUrl(path: string): string;
298
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
299
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
300
+ downloadFile(path: string): Promise<string>;
301
+ };
302
+ options: object;
303
+ req: import("frogbot").FrogbotRequest;
304
+ }) => Promise<import("frogbot").PieceOption[]>) | undefined;
305
+ messageThreadId?: ((args: {
306
+ input: Partial<{
307
+ disableNotification: boolean;
308
+ protectContent: boolean;
309
+ chatId: string | number;
310
+ mediaType: "photo" | "video" | "sticker" | "animation";
311
+ media: string | {
312
+ fileId: string | number;
313
+ name?: string | undefined;
314
+ };
315
+ parseMode: "MarkdownV2" | "HTML" | "None";
316
+ replyToMessageId?: number | undefined;
317
+ replyMarkup?: Record<string, unknown> | undefined;
318
+ messageThreadId?: number | undefined;
319
+ message?: string | undefined;
320
+ }>;
321
+ client: {
322
+ fileUrl(path: string): string;
323
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
324
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
325
+ downloadFile(path: string): Promise<string>;
326
+ };
327
+ options: object;
328
+ req: import("frogbot").FrogbotRequest;
329
+ }) => Promise<import("frogbot").PieceOption[]>) | undefined;
330
+ message?: ((args: {
331
+ input: Partial<{
332
+ disableNotification: boolean;
333
+ protectContent: boolean;
334
+ chatId: string | number;
335
+ mediaType: "photo" | "video" | "sticker" | "animation";
336
+ media: string | {
337
+ fileId: string | number;
338
+ name?: string | undefined;
339
+ };
340
+ parseMode: "MarkdownV2" | "HTML" | "None";
341
+ replyToMessageId?: number | undefined;
342
+ replyMarkup?: Record<string, unknown> | undefined;
343
+ messageThreadId?: number | undefined;
344
+ message?: string | undefined;
345
+ }>;
346
+ client: {
347
+ fileUrl(path: string): string;
348
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
349
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
350
+ downloadFile(path: string): Promise<string>;
351
+ };
352
+ options: object;
353
+ req: import("frogbot").FrogbotRequest;
354
+ }) => Promise<import("frogbot").PieceOption[]>) | undefined;
355
+ }> | undefined;
356
+ }, {
357
+ run({ client, input, req }: import("frogbot").PieceRunArgs<{
358
+ [x: string]: unknown;
359
+ }, object, TelegramBotClient>): Promise<{
360
+ [x: string]: unknown;
361
+ ok: true;
362
+ result?: unknown;
363
+ }>;
364
+ slug: string;
365
+ label?: string;
366
+ description: string;
367
+ input: z.ZodObject<{
368
+ replyToMessageId: z.ZodOptional<z.ZodNumber>;
369
+ replyMarkup: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
370
+ messageThreadId: z.ZodOptional<z.ZodNumber>;
371
+ disableNotification: z.ZodDefault<z.ZodBoolean>;
372
+ protectContent: z.ZodDefault<z.ZodBoolean>;
373
+ chatId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
374
+ document: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
375
+ fileId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
376
+ name: z.ZodOptional<z.ZodString>;
377
+ }, z.core.$strip>]>;
378
+ caption: z.ZodOptional<z.ZodString>;
379
+ parseMode: z.ZodDefault<z.ZodEnum<{
380
+ MarkdownV2: "MarkdownV2";
381
+ HTML: "HTML";
382
+ None: "None";
383
+ }>>;
384
+ }, z.core.$strip>;
385
+ output?: z.ZodObject<{
386
+ ok: z.ZodLiteral<true>;
387
+ result: z.ZodOptional<z.ZodUnknown>;
388
+ }, z.core.$loose> | undefined;
389
+ idempotent?: boolean;
390
+ options?: Partial<{
391
+ disableNotification: (args: {
392
+ input: Partial<{
393
+ disableNotification: boolean;
394
+ protectContent: boolean;
395
+ chatId: string | number;
396
+ document: string | {
397
+ fileId: string | number;
398
+ name?: string | undefined;
399
+ };
400
+ parseMode: "MarkdownV2" | "HTML" | "None";
401
+ replyToMessageId?: number | undefined;
402
+ replyMarkup?: Record<string, unknown> | undefined;
403
+ messageThreadId?: number | undefined;
404
+ caption?: string | undefined;
405
+ }>;
406
+ client: {
407
+ fileUrl(path: string): string;
408
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
409
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
410
+ downloadFile(path: string): Promise<string>;
411
+ };
412
+ options: object;
413
+ req: import("frogbot").FrogbotRequest;
414
+ }) => Promise<import("frogbot").PieceOption[]>;
415
+ protectContent: (args: {
416
+ input: Partial<{
417
+ disableNotification: boolean;
418
+ protectContent: boolean;
419
+ chatId: string | number;
420
+ document: string | {
421
+ fileId: string | number;
422
+ name?: string | undefined;
423
+ };
424
+ parseMode: "MarkdownV2" | "HTML" | "None";
425
+ replyToMessageId?: number | undefined;
426
+ replyMarkup?: Record<string, unknown> | undefined;
427
+ messageThreadId?: number | undefined;
428
+ caption?: string | undefined;
429
+ }>;
430
+ client: {
431
+ fileUrl(path: string): string;
432
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
433
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
434
+ downloadFile(path: string): Promise<string>;
435
+ };
436
+ options: object;
437
+ req: import("frogbot").FrogbotRequest;
438
+ }) => Promise<import("frogbot").PieceOption[]>;
439
+ chatId: (args: {
440
+ input: Partial<{
441
+ disableNotification: boolean;
442
+ protectContent: boolean;
443
+ chatId: string | number;
444
+ document: string | {
445
+ fileId: string | number;
446
+ name?: string | undefined;
447
+ };
448
+ parseMode: "MarkdownV2" | "HTML" | "None";
449
+ replyToMessageId?: number | undefined;
450
+ replyMarkup?: Record<string, unknown> | undefined;
451
+ messageThreadId?: number | undefined;
452
+ caption?: string | undefined;
453
+ }>;
454
+ client: {
455
+ fileUrl(path: string): string;
456
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
457
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
458
+ downloadFile(path: string): Promise<string>;
459
+ };
460
+ options: object;
461
+ req: import("frogbot").FrogbotRequest;
462
+ }) => Promise<import("frogbot").PieceOption[]>;
463
+ document: (args: {
464
+ input: Partial<{
465
+ disableNotification: boolean;
466
+ protectContent: boolean;
467
+ chatId: string | number;
468
+ document: string | {
469
+ fileId: string | number;
470
+ name?: string | undefined;
471
+ };
472
+ parseMode: "MarkdownV2" | "HTML" | "None";
473
+ replyToMessageId?: number | undefined;
474
+ replyMarkup?: Record<string, unknown> | undefined;
475
+ messageThreadId?: number | undefined;
476
+ caption?: string | undefined;
477
+ }>;
478
+ client: {
479
+ fileUrl(path: string): string;
480
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
481
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
482
+ downloadFile(path: string): Promise<string>;
483
+ };
484
+ options: object;
485
+ req: import("frogbot").FrogbotRequest;
486
+ }) => Promise<import("frogbot").PieceOption[]>;
487
+ parseMode: (args: {
488
+ input: Partial<{
489
+ disableNotification: boolean;
490
+ protectContent: boolean;
491
+ chatId: string | number;
492
+ document: string | {
493
+ fileId: string | number;
494
+ name?: string | undefined;
495
+ };
496
+ parseMode: "MarkdownV2" | "HTML" | "None";
497
+ replyToMessageId?: number | undefined;
498
+ replyMarkup?: Record<string, unknown> | undefined;
499
+ messageThreadId?: number | undefined;
500
+ caption?: string | undefined;
501
+ }>;
502
+ client: {
503
+ fileUrl(path: string): string;
504
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
505
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
506
+ downloadFile(path: string): Promise<string>;
507
+ };
508
+ options: object;
509
+ req: import("frogbot").FrogbotRequest;
510
+ }) => Promise<import("frogbot").PieceOption[]>;
511
+ replyToMessageId?: ((args: {
512
+ input: Partial<{
513
+ disableNotification: boolean;
514
+ protectContent: boolean;
515
+ chatId: string | number;
516
+ document: string | {
517
+ fileId: string | number;
518
+ name?: string | undefined;
519
+ };
520
+ parseMode: "MarkdownV2" | "HTML" | "None";
521
+ replyToMessageId?: number | undefined;
522
+ replyMarkup?: Record<string, unknown> | undefined;
523
+ messageThreadId?: number | undefined;
524
+ caption?: string | undefined;
525
+ }>;
526
+ client: {
527
+ fileUrl(path: string): string;
528
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
529
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
530
+ downloadFile(path: string): Promise<string>;
531
+ };
532
+ options: object;
533
+ req: import("frogbot").FrogbotRequest;
534
+ }) => Promise<import("frogbot").PieceOption[]>) | undefined;
535
+ replyMarkup?: ((args: {
536
+ input: Partial<{
537
+ disableNotification: boolean;
538
+ protectContent: boolean;
539
+ chatId: string | number;
540
+ document: string | {
541
+ fileId: string | number;
542
+ name?: string | undefined;
543
+ };
544
+ parseMode: "MarkdownV2" | "HTML" | "None";
545
+ replyToMessageId?: number | undefined;
546
+ replyMarkup?: Record<string, unknown> | undefined;
547
+ messageThreadId?: number | undefined;
548
+ caption?: string | undefined;
549
+ }>;
550
+ client: {
551
+ fileUrl(path: string): string;
552
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
553
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
554
+ downloadFile(path: string): Promise<string>;
555
+ };
556
+ options: object;
557
+ req: import("frogbot").FrogbotRequest;
558
+ }) => Promise<import("frogbot").PieceOption[]>) | undefined;
559
+ messageThreadId?: ((args: {
560
+ input: Partial<{
561
+ disableNotification: boolean;
562
+ protectContent: boolean;
563
+ chatId: string | number;
564
+ document: string | {
565
+ fileId: string | number;
566
+ name?: string | undefined;
567
+ };
568
+ parseMode: "MarkdownV2" | "HTML" | "None";
569
+ replyToMessageId?: number | undefined;
570
+ replyMarkup?: Record<string, unknown> | undefined;
571
+ messageThreadId?: number | undefined;
572
+ caption?: string | undefined;
573
+ }>;
574
+ client: {
575
+ fileUrl(path: string): string;
576
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
577
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
578
+ downloadFile(path: string): Promise<string>;
579
+ };
580
+ options: object;
581
+ req: import("frogbot").FrogbotRequest;
582
+ }) => Promise<import("frogbot").PieceOption[]>) | undefined;
583
+ caption?: ((args: {
584
+ input: Partial<{
585
+ disableNotification: boolean;
586
+ protectContent: boolean;
587
+ chatId: string | number;
588
+ document: string | {
589
+ fileId: string | number;
590
+ name?: string | undefined;
591
+ };
592
+ parseMode: "MarkdownV2" | "HTML" | "None";
593
+ replyToMessageId?: number | undefined;
594
+ replyMarkup?: Record<string, unknown> | undefined;
595
+ messageThreadId?: number | undefined;
596
+ caption?: string | undefined;
597
+ }>;
598
+ client: {
599
+ fileUrl(path: string): string;
600
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
601
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
602
+ downloadFile(path: string): Promise<string>;
603
+ };
604
+ options: object;
605
+ req: import("frogbot").FrogbotRequest;
606
+ }) => Promise<import("frogbot").PieceOption[]>) | undefined;
607
+ }> | undefined;
608
+ }, {
609
+ run({ client, input, req }: import("frogbot").PieceRunArgs<{
610
+ [x: string]: unknown;
611
+ }, object, TelegramBotClient>): Promise<{
612
+ [x: string]: unknown;
613
+ ok: true;
614
+ result?: unknown;
615
+ }>;
616
+ slug: string;
617
+ label?: string;
618
+ description: string;
619
+ input: z.ZodObject<{
620
+ replyToMessageId: z.ZodOptional<z.ZodNumber>;
621
+ replyMarkup: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
622
+ messageThreadId: z.ZodOptional<z.ZodNumber>;
623
+ disableNotification: z.ZodDefault<z.ZodBoolean>;
624
+ protectContent: z.ZodDefault<z.ZodBoolean>;
625
+ chatId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
626
+ audio: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
627
+ fileId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
628
+ name: z.ZodOptional<z.ZodString>;
629
+ }, z.core.$strip>]>;
630
+ caption: z.ZodOptional<z.ZodString>;
631
+ parseMode: z.ZodDefault<z.ZodEnum<{
632
+ MarkdownV2: "MarkdownV2";
633
+ HTML: "HTML";
634
+ None: "None";
635
+ }>>;
636
+ duration: z.ZodOptional<z.ZodNumber>;
637
+ performer: z.ZodOptional<z.ZodString>;
638
+ title: z.ZodOptional<z.ZodString>;
639
+ thumbnail: z.ZodOptional<z.ZodString>;
640
+ }, z.core.$strip>;
641
+ output?: z.ZodObject<{
642
+ ok: z.ZodLiteral<true>;
643
+ result: z.ZodOptional<z.ZodUnknown>;
644
+ }, z.core.$loose> | undefined;
645
+ idempotent?: boolean;
646
+ options?: Partial<{
647
+ disableNotification: (args: {
648
+ input: Partial<{
649
+ disableNotification: boolean;
650
+ protectContent: boolean;
651
+ chatId: string | number;
652
+ audio: string | {
653
+ fileId: string | number;
654
+ name?: string | undefined;
655
+ };
656
+ parseMode: "MarkdownV2" | "HTML" | "None";
657
+ replyToMessageId?: number | undefined;
658
+ replyMarkup?: Record<string, unknown> | undefined;
659
+ messageThreadId?: number | undefined;
660
+ caption?: string | undefined;
661
+ duration?: number | undefined;
662
+ performer?: string | undefined;
663
+ title?: string | undefined;
664
+ thumbnail?: string | undefined;
665
+ }>;
666
+ client: {
667
+ fileUrl(path: string): string;
668
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
669
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
670
+ downloadFile(path: string): Promise<string>;
671
+ };
672
+ options: object;
673
+ req: import("frogbot").FrogbotRequest;
674
+ }) => Promise<import("frogbot").PieceOption[]>;
675
+ protectContent: (args: {
676
+ input: Partial<{
677
+ disableNotification: boolean;
678
+ protectContent: boolean;
679
+ chatId: string | number;
680
+ audio: string | {
681
+ fileId: string | number;
682
+ name?: string | undefined;
683
+ };
684
+ parseMode: "MarkdownV2" | "HTML" | "None";
685
+ replyToMessageId?: number | undefined;
686
+ replyMarkup?: Record<string, unknown> | undefined;
687
+ messageThreadId?: number | undefined;
688
+ caption?: string | undefined;
689
+ duration?: number | undefined;
690
+ performer?: string | undefined;
691
+ title?: string | undefined;
692
+ thumbnail?: string | undefined;
693
+ }>;
694
+ client: {
695
+ fileUrl(path: string): string;
696
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
697
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
698
+ downloadFile(path: string): Promise<string>;
699
+ };
700
+ options: object;
701
+ req: import("frogbot").FrogbotRequest;
702
+ }) => Promise<import("frogbot").PieceOption[]>;
703
+ chatId: (args: {
704
+ input: Partial<{
705
+ disableNotification: boolean;
706
+ protectContent: boolean;
707
+ chatId: string | number;
708
+ audio: string | {
709
+ fileId: string | number;
710
+ name?: string | undefined;
711
+ };
712
+ parseMode: "MarkdownV2" | "HTML" | "None";
713
+ replyToMessageId?: number | undefined;
714
+ replyMarkup?: Record<string, unknown> | undefined;
715
+ messageThreadId?: number | undefined;
716
+ caption?: string | undefined;
717
+ duration?: number | undefined;
718
+ performer?: string | undefined;
719
+ title?: string | undefined;
720
+ thumbnail?: string | undefined;
721
+ }>;
722
+ client: {
723
+ fileUrl(path: string): string;
724
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
725
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
726
+ downloadFile(path: string): Promise<string>;
727
+ };
728
+ options: object;
729
+ req: import("frogbot").FrogbotRequest;
730
+ }) => Promise<import("frogbot").PieceOption[]>;
731
+ audio: (args: {
732
+ input: Partial<{
733
+ disableNotification: boolean;
734
+ protectContent: boolean;
735
+ chatId: string | number;
736
+ audio: string | {
737
+ fileId: string | number;
738
+ name?: string | undefined;
739
+ };
740
+ parseMode: "MarkdownV2" | "HTML" | "None";
741
+ replyToMessageId?: number | undefined;
742
+ replyMarkup?: Record<string, unknown> | undefined;
743
+ messageThreadId?: number | undefined;
744
+ caption?: string | undefined;
745
+ duration?: number | undefined;
746
+ performer?: string | undefined;
747
+ title?: string | undefined;
748
+ thumbnail?: string | undefined;
749
+ }>;
750
+ client: {
751
+ fileUrl(path: string): string;
752
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
753
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
754
+ downloadFile(path: string): Promise<string>;
755
+ };
756
+ options: object;
757
+ req: import("frogbot").FrogbotRequest;
758
+ }) => Promise<import("frogbot").PieceOption[]>;
759
+ parseMode: (args: {
760
+ input: Partial<{
761
+ disableNotification: boolean;
762
+ protectContent: boolean;
763
+ chatId: string | number;
764
+ audio: string | {
765
+ fileId: string | number;
766
+ name?: string | undefined;
767
+ };
768
+ parseMode: "MarkdownV2" | "HTML" | "None";
769
+ replyToMessageId?: number | undefined;
770
+ replyMarkup?: Record<string, unknown> | undefined;
771
+ messageThreadId?: number | undefined;
772
+ caption?: string | undefined;
773
+ duration?: number | undefined;
774
+ performer?: string | undefined;
775
+ title?: string | undefined;
776
+ thumbnail?: string | undefined;
777
+ }>;
778
+ client: {
779
+ fileUrl(path: string): string;
780
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
781
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
782
+ downloadFile(path: string): Promise<string>;
783
+ };
784
+ options: object;
785
+ req: import("frogbot").FrogbotRequest;
786
+ }) => Promise<import("frogbot").PieceOption[]>;
787
+ replyToMessageId?: ((args: {
788
+ input: Partial<{
789
+ disableNotification: boolean;
790
+ protectContent: boolean;
791
+ chatId: string | number;
792
+ audio: string | {
793
+ fileId: string | number;
794
+ name?: string | undefined;
795
+ };
796
+ parseMode: "MarkdownV2" | "HTML" | "None";
797
+ replyToMessageId?: number | undefined;
798
+ replyMarkup?: Record<string, unknown> | undefined;
799
+ messageThreadId?: number | undefined;
800
+ caption?: string | undefined;
801
+ duration?: number | undefined;
802
+ performer?: string | undefined;
803
+ title?: string | undefined;
804
+ thumbnail?: string | undefined;
805
+ }>;
806
+ client: {
807
+ fileUrl(path: string): string;
808
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
809
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
810
+ downloadFile(path: string): Promise<string>;
811
+ };
812
+ options: object;
813
+ req: import("frogbot").FrogbotRequest;
814
+ }) => Promise<import("frogbot").PieceOption[]>) | undefined;
815
+ replyMarkup?: ((args: {
816
+ input: Partial<{
817
+ disableNotification: boolean;
818
+ protectContent: boolean;
819
+ chatId: string | number;
820
+ audio: string | {
821
+ fileId: string | number;
822
+ name?: string | undefined;
823
+ };
824
+ parseMode: "MarkdownV2" | "HTML" | "None";
825
+ replyToMessageId?: number | undefined;
826
+ replyMarkup?: Record<string, unknown> | undefined;
827
+ messageThreadId?: number | undefined;
828
+ caption?: string | undefined;
829
+ duration?: number | undefined;
830
+ performer?: string | undefined;
831
+ title?: string | undefined;
832
+ thumbnail?: string | undefined;
833
+ }>;
834
+ client: {
835
+ fileUrl(path: string): string;
836
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
837
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
838
+ downloadFile(path: string): Promise<string>;
839
+ };
840
+ options: object;
841
+ req: import("frogbot").FrogbotRequest;
842
+ }) => Promise<import("frogbot").PieceOption[]>) | undefined;
843
+ messageThreadId?: ((args: {
844
+ input: Partial<{
845
+ disableNotification: boolean;
846
+ protectContent: boolean;
847
+ chatId: string | number;
848
+ audio: string | {
849
+ fileId: string | number;
850
+ name?: string | undefined;
851
+ };
852
+ parseMode: "MarkdownV2" | "HTML" | "None";
853
+ replyToMessageId?: number | undefined;
854
+ replyMarkup?: Record<string, unknown> | undefined;
855
+ messageThreadId?: number | undefined;
856
+ caption?: string | undefined;
857
+ duration?: number | undefined;
858
+ performer?: string | undefined;
859
+ title?: string | undefined;
860
+ thumbnail?: string | undefined;
861
+ }>;
862
+ client: {
863
+ fileUrl(path: string): string;
864
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
865
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
866
+ downloadFile(path: string): Promise<string>;
867
+ };
868
+ options: object;
869
+ req: import("frogbot").FrogbotRequest;
870
+ }) => Promise<import("frogbot").PieceOption[]>) | undefined;
871
+ caption?: ((args: {
872
+ input: Partial<{
873
+ disableNotification: boolean;
874
+ protectContent: boolean;
875
+ chatId: string | number;
876
+ audio: string | {
877
+ fileId: string | number;
878
+ name?: string | undefined;
879
+ };
880
+ parseMode: "MarkdownV2" | "HTML" | "None";
881
+ replyToMessageId?: number | undefined;
882
+ replyMarkup?: Record<string, unknown> | undefined;
883
+ messageThreadId?: number | undefined;
884
+ caption?: string | undefined;
885
+ duration?: number | undefined;
886
+ performer?: string | undefined;
887
+ title?: string | undefined;
888
+ thumbnail?: string | undefined;
889
+ }>;
890
+ client: {
891
+ fileUrl(path: string): string;
892
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
893
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
894
+ downloadFile(path: string): Promise<string>;
895
+ };
896
+ options: object;
897
+ req: import("frogbot").FrogbotRequest;
898
+ }) => Promise<import("frogbot").PieceOption[]>) | undefined;
899
+ duration?: ((args: {
900
+ input: Partial<{
901
+ disableNotification: boolean;
902
+ protectContent: boolean;
903
+ chatId: string | number;
904
+ audio: string | {
905
+ fileId: string | number;
906
+ name?: string | undefined;
907
+ };
908
+ parseMode: "MarkdownV2" | "HTML" | "None";
909
+ replyToMessageId?: number | undefined;
910
+ replyMarkup?: Record<string, unknown> | undefined;
911
+ messageThreadId?: number | undefined;
912
+ caption?: string | undefined;
913
+ duration?: number | undefined;
914
+ performer?: string | undefined;
915
+ title?: string | undefined;
916
+ thumbnail?: string | undefined;
917
+ }>;
918
+ client: {
919
+ fileUrl(path: string): string;
920
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
921
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
922
+ downloadFile(path: string): Promise<string>;
923
+ };
924
+ options: object;
925
+ req: import("frogbot").FrogbotRequest;
926
+ }) => Promise<import("frogbot").PieceOption[]>) | undefined;
927
+ performer?: ((args: {
928
+ input: Partial<{
929
+ disableNotification: boolean;
930
+ protectContent: boolean;
931
+ chatId: string | number;
932
+ audio: string | {
933
+ fileId: string | number;
934
+ name?: string | undefined;
935
+ };
936
+ parseMode: "MarkdownV2" | "HTML" | "None";
937
+ replyToMessageId?: number | undefined;
938
+ replyMarkup?: Record<string, unknown> | undefined;
939
+ messageThreadId?: number | undefined;
940
+ caption?: string | undefined;
941
+ duration?: number | undefined;
942
+ performer?: string | undefined;
943
+ title?: string | undefined;
944
+ thumbnail?: string | undefined;
945
+ }>;
946
+ client: {
947
+ fileUrl(path: string): string;
948
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
949
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
950
+ downloadFile(path: string): Promise<string>;
951
+ };
952
+ options: object;
953
+ req: import("frogbot").FrogbotRequest;
954
+ }) => Promise<import("frogbot").PieceOption[]>) | undefined;
955
+ title?: ((args: {
956
+ input: Partial<{
957
+ disableNotification: boolean;
958
+ protectContent: boolean;
959
+ chatId: string | number;
960
+ audio: string | {
961
+ fileId: string | number;
962
+ name?: string | undefined;
963
+ };
964
+ parseMode: "MarkdownV2" | "HTML" | "None";
965
+ replyToMessageId?: number | undefined;
966
+ replyMarkup?: Record<string, unknown> | undefined;
967
+ messageThreadId?: number | undefined;
968
+ caption?: string | undefined;
969
+ duration?: number | undefined;
970
+ performer?: string | undefined;
971
+ title?: string | undefined;
972
+ thumbnail?: string | undefined;
973
+ }>;
974
+ client: {
975
+ fileUrl(path: string): string;
976
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
977
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
978
+ downloadFile(path: string): Promise<string>;
979
+ };
980
+ options: object;
981
+ req: import("frogbot").FrogbotRequest;
982
+ }) => Promise<import("frogbot").PieceOption[]>) | undefined;
983
+ thumbnail?: ((args: {
984
+ input: Partial<{
985
+ disableNotification: boolean;
986
+ protectContent: boolean;
987
+ chatId: string | number;
988
+ audio: string | {
989
+ fileId: string | number;
990
+ name?: string | undefined;
991
+ };
992
+ parseMode: "MarkdownV2" | "HTML" | "None";
993
+ replyToMessageId?: number | undefined;
994
+ replyMarkup?: Record<string, unknown> | undefined;
995
+ messageThreadId?: number | undefined;
996
+ caption?: string | undefined;
997
+ duration?: number | undefined;
998
+ performer?: string | undefined;
999
+ title?: string | undefined;
1000
+ thumbnail?: string | undefined;
1001
+ }>;
1002
+ client: {
1003
+ fileUrl(path: string): string;
1004
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
1005
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
1006
+ downloadFile(path: string): Promise<string>;
1007
+ };
1008
+ options: object;
1009
+ req: import("frogbot").FrogbotRequest;
1010
+ }) => Promise<import("frogbot").PieceOption[]>) | undefined;
1011
+ }> | undefined;
1012
+ }, import("frogbot").PieceActionDefinition<z.ZodObject<{
1013
+ replyToMessageId: z.ZodOptional<z.ZodNumber>;
1014
+ replyMarkup: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
1015
+ messageThreadId: z.ZodOptional<z.ZodNumber>;
1016
+ disableNotification: z.ZodDefault<z.ZodBoolean>;
1017
+ protectContent: z.ZodDefault<z.ZodBoolean>;
1018
+ chatId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
1019
+ latitude: z.ZodNumber;
1020
+ longitude: z.ZodNumber;
1021
+ horizontalAccuracy: z.ZodOptional<z.ZodNumber>;
1022
+ livePeriod: z.ZodOptional<z.ZodNumber>;
1023
+ heading: z.ZodOptional<z.ZodNumber>;
1024
+ proximityAlertRadius: z.ZodOptional<z.ZodNumber>;
1025
+ }, z.core.$strip>, z.ZodObject<{
1026
+ ok: z.ZodLiteral<true>;
1027
+ result: z.ZodOptional<z.ZodUnknown>;
1028
+ }, z.core.$loose>, object, {
1029
+ fileUrl(path: string): string;
1030
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
1031
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
1032
+ downloadFile(path: string): Promise<string>;
1033
+ }>, import("frogbot").PieceActionDefinition<z.ZodObject<{
1034
+ messageThreadId: z.ZodOptional<z.ZodNumber>;
1035
+ disableNotification: z.ZodDefault<z.ZodBoolean>;
1036
+ protectContent: z.ZodDefault<z.ZodBoolean>;
1037
+ chatId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
1038
+ media: z.ZodArray<z.ZodObject<{
1039
+ type: z.ZodEnum<{
1040
+ photo: "photo";
1041
+ video: "video";
1042
+ document: "document";
1043
+ audio: "audio";
1044
+ }>;
1045
+ media: z.ZodString;
1046
+ caption: z.ZodOptional<z.ZodString>;
1047
+ parseMode: z.ZodOptional<z.ZodEnum<{
1048
+ MarkdownV2: "MarkdownV2";
1049
+ HTML: "HTML";
1050
+ }>>;
1051
+ }, z.core.$strip>>;
1052
+ }, z.core.$strip>, z.ZodObject<{
1053
+ ok: z.ZodLiteral<true>;
1054
+ result: z.ZodOptional<z.ZodUnknown>;
1055
+ }, z.core.$loose>, object, {
1056
+ fileUrl(path: string): string;
1057
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
1058
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
1059
+ downloadFile(path: string): Promise<string>;
1060
+ }>, import("frogbot").PieceActionDefinition<z.ZodObject<{
1061
+ replyToMessageId: z.ZodOptional<z.ZodNumber>;
1062
+ replyMarkup: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
1063
+ messageThreadId: z.ZodOptional<z.ZodNumber>;
1064
+ disableNotification: z.ZodDefault<z.ZodBoolean>;
1065
+ protectContent: z.ZodDefault<z.ZodBoolean>;
1066
+ chatId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
1067
+ question: z.ZodString;
1068
+ options: z.ZodArray<z.ZodString>;
1069
+ isAnonymous: z.ZodDefault<z.ZodBoolean>;
1070
+ type: z.ZodDefault<z.ZodEnum<{
1071
+ regular: "regular";
1072
+ quiz: "quiz";
1073
+ }>>;
1074
+ allowsMultipleAnswers: z.ZodDefault<z.ZodBoolean>;
1075
+ correctOptionId: z.ZodOptional<z.ZodNumber>;
1076
+ explanation: z.ZodOptional<z.ZodString>;
1077
+ explanationParseMode: z.ZodOptional<z.ZodEnum<{
1078
+ MarkdownV2: "MarkdownV2";
1079
+ HTML: "HTML";
1080
+ }>>;
1081
+ openPeriod: z.ZodOptional<z.ZodNumber>;
1082
+ closeDate: z.ZodOptional<z.ZodNumber>;
1083
+ isClosed: z.ZodDefault<z.ZodBoolean>;
1084
+ }, z.core.$strip>, z.ZodObject<{
1085
+ ok: z.ZodLiteral<true>;
1086
+ result: z.ZodOptional<z.ZodUnknown>;
1087
+ }, z.core.$loose>, object, {
1088
+ fileUrl(path: string): string;
1089
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
1090
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
1091
+ downloadFile(path: string): Promise<string>;
1092
+ }>, import("frogbot").PieceActionDefinition<z.ZodObject<{
1093
+ chatId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
1094
+ messageThreadId: z.ZodOptional<z.ZodNumber>;
1095
+ action: z.ZodEnum<{
1096
+ typing: "typing";
1097
+ upload_photo: "upload_photo";
1098
+ record_video: "record_video";
1099
+ upload_video: "upload_video";
1100
+ record_voice: "record_voice";
1101
+ upload_voice: "upload_voice";
1102
+ upload_document: "upload_document";
1103
+ choose_sticker: "choose_sticker";
1104
+ find_location: "find_location";
1105
+ record_video_note: "record_video_note";
1106
+ upload_video_note: "upload_video_note";
1107
+ }>;
1108
+ }, z.core.$strip>, z.ZodObject<{
1109
+ ok: z.ZodLiteral<true>;
1110
+ result: z.ZodOptional<z.ZodUnknown>;
1111
+ }, z.core.$loose>, object, {
1112
+ fileUrl(path: string): string;
1113
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
1114
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
1115
+ downloadFile(path: string): Promise<string>;
1116
+ }>, import("frogbot").PieceActionDefinition<z.ZodObject<{
1117
+ chatId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1118
+ messageId: z.ZodOptional<z.ZodNumber>;
1119
+ inlineMessageId: z.ZodOptional<z.ZodString>;
1120
+ text: z.ZodString;
1121
+ parseMode: z.ZodDefault<z.ZodEnum<{
1122
+ MarkdownV2: "MarkdownV2";
1123
+ HTML: "HTML";
1124
+ None: "None";
1125
+ }>>;
1126
+ replyMarkup: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
1127
+ }, z.core.$strip>, z.ZodObject<{
1128
+ ok: z.ZodLiteral<true>;
1129
+ result: z.ZodOptional<z.ZodUnknown>;
1130
+ }, z.core.$loose>, object, {
1131
+ fileUrl(path: string): string;
1132
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
1133
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
1134
+ downloadFile(path: string): Promise<string>;
1135
+ }>, import("frogbot").PieceActionDefinition<z.ZodObject<{
1136
+ chatId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
1137
+ messageId: z.ZodNumber;
1138
+ }, z.core.$strip>, z.ZodObject<{
1139
+ ok: z.ZodLiteral<true>;
1140
+ result: z.ZodOptional<z.ZodUnknown>;
1141
+ }, z.core.$loose>, object, {
1142
+ fileUrl(path: string): string;
1143
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
1144
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
1145
+ downloadFile(path: string): Promise<string>;
1146
+ }>, import("frogbot").PieceActionDefinition<z.ZodObject<{
1147
+ messageThreadId: z.ZodOptional<z.ZodNumber>;
1148
+ disableNotification: z.ZodDefault<z.ZodBoolean>;
1149
+ protectContent: z.ZodDefault<z.ZodBoolean>;
1150
+ chatId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
1151
+ fromChatId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
1152
+ messageId: z.ZodNumber;
1153
+ }, z.core.$strip>, z.ZodObject<{
1154
+ ok: z.ZodLiteral<true>;
1155
+ result: z.ZodOptional<z.ZodUnknown>;
1156
+ }, z.core.$loose>, object, {
1157
+ fileUrl(path: string): string;
1158
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
1159
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
1160
+ downloadFile(path: string): Promise<string>;
1161
+ }>, import("frogbot").PieceActionDefinition<z.ZodObject<{
1162
+ chatId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
1163
+ messageId: z.ZodNumber;
1164
+ disableNotification: z.ZodDefault<z.ZodBoolean>;
1165
+ }, z.core.$strip>, z.ZodObject<{
1166
+ ok: z.ZodLiteral<true>;
1167
+ result: z.ZodOptional<z.ZodUnknown>;
1168
+ }, z.core.$loose>, object, {
1169
+ fileUrl(path: string): string;
1170
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
1171
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
1172
+ downloadFile(path: string): Promise<string>;
1173
+ }>, import("frogbot").PieceActionDefinition<z.ZodObject<{
1174
+ chatId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
1175
+ messageId: z.ZodOptional<z.ZodNumber>;
1176
+ }, z.core.$strip>, z.ZodObject<{
1177
+ ok: z.ZodLiteral<true>;
1178
+ result: z.ZodOptional<z.ZodUnknown>;
1179
+ }, z.core.$loose>, object, {
1180
+ fileUrl(path: string): string;
1181
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
1182
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
1183
+ downloadFile(path: string): Promise<string>;
1184
+ }>, import("frogbot").PieceActionDefinition<z.ZodObject<{
1185
+ chatId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
1186
+ }, z.core.$strip>, z.ZodObject<{
1187
+ ok: z.ZodLiteral<true>;
1188
+ result: z.ZodOptional<z.ZodUnknown>;
1189
+ }, z.core.$loose>, object, {
1190
+ fileUrl(path: string): string;
1191
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
1192
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
1193
+ downloadFile(path: string): Promise<string>;
1194
+ }>, import("frogbot").PieceActionDefinition<z.ZodObject<{
1195
+ chatId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
1196
+ userId: z.ZodNumber;
1197
+ }, z.core.$strip>, z.ZodObject<{
1198
+ ok: z.ZodLiteral<true>;
1199
+ result: z.ZodOptional<z.ZodUnknown>;
1200
+ }, z.core.$loose>, object, {
1201
+ fileUrl(path: string): string;
1202
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
1203
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
1204
+ downloadFile(path: string): Promise<string>;
1205
+ }>, {
1206
+ slug: string;
1207
+ description: string;
1208
+ input: z.ZodObject<{
1209
+ fileId: z.ZodString;
1210
+ download: z.ZodDefault<z.ZodBoolean>;
1211
+ }, z.core.$strip>;
1212
+ output: z.ZodObject<{
1213
+ fileInfo: z.ZodObject<{
1214
+ file_id: z.ZodString;
1215
+ file_unique_id: z.ZodString;
1216
+ file_size: z.ZodOptional<z.ZodNumber>;
1217
+ file_path: z.ZodOptional<z.ZodString>;
1218
+ }, z.core.$loose>;
1219
+ fileUrl: z.ZodOptional<z.ZodString>;
1220
+ fileContentBase64: z.ZodOptional<z.ZodString>;
1221
+ }, z.core.$strip>;
1222
+ idempotent: boolean;
1223
+ run({ client, input, }: import("frogbot").PieceRunArgs<{
1224
+ fileId: string;
1225
+ download: boolean;
1226
+ }, object, TelegramBotClient>): Promise<{
1227
+ fileInfo: {
1228
+ [x: string]: unknown;
1229
+ file_id: string;
1230
+ file_unique_id: string;
1231
+ file_size?: number | undefined;
1232
+ file_path?: string | undefined;
1233
+ };
1234
+ fileUrl: string | undefined;
1235
+ fileContentBase64: string | undefined;
1236
+ }>;
1237
+ }, import("frogbot").PieceActionDefinition<z.ZodObject<{
1238
+ chatId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
1239
+ name: z.ZodOptional<z.ZodString>;
1240
+ expireDate: z.ZodOptional<z.ZodNumber>;
1241
+ memberLimit: z.ZodOptional<z.ZodNumber>;
1242
+ createsJoinRequest: z.ZodDefault<z.ZodBoolean>;
1243
+ }, z.core.$strip>, z.ZodObject<{
1244
+ ok: z.ZodLiteral<true>;
1245
+ result: z.ZodOptional<z.ZodUnknown>;
1246
+ }, z.core.$loose>, object, {
1247
+ fileUrl(path: string): string;
1248
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
1249
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
1250
+ downloadFile(path: string): Promise<string>;
1251
+ }>, import("frogbot").PieceActionDefinition<z.ZodObject<{
1252
+ callbackQueryId: z.ZodString;
1253
+ text: z.ZodOptional<z.ZodString>;
1254
+ showAlert: z.ZodDefault<z.ZodBoolean>;
1255
+ url: z.ZodOptional<z.ZodString>;
1256
+ cacheTime: z.ZodDefault<z.ZodNumber>;
1257
+ }, z.core.$strip>, z.ZodObject<{
1258
+ ok: z.ZodLiteral<true>;
1259
+ result: z.ZodOptional<z.ZodUnknown>;
1260
+ }, z.core.$loose>, object, {
1261
+ fileUrl(path: string): string;
1262
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
1263
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
1264
+ downloadFile(path: string): Promise<string>;
1265
+ }>, {
1266
+ slug: string;
1267
+ description: string;
1268
+ input: z.ZodObject<{
1269
+ method: z.ZodDefault<z.ZodEnum<{
1270
+ POST: "POST";
1271
+ GET: "GET";
1272
+ PUT: "PUT";
1273
+ PATCH: "PATCH";
1274
+ DELETE: "DELETE";
1275
+ }>>;
1276
+ endpoint: z.ZodString;
1277
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1278
+ query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
1279
+ body: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1280
+ }, z.core.$strip>;
1281
+ output: z.ZodUnknown;
1282
+ idempotent: boolean;
1283
+ run({ client, input, }: import("frogbot").PieceRunArgs<z.output<z.ZodObject<{
1284
+ method: z.ZodDefault<z.ZodEnum<{
1285
+ POST: "POST";
1286
+ GET: "GET";
1287
+ PUT: "PUT";
1288
+ PATCH: "PATCH";
1289
+ DELETE: "DELETE";
1290
+ }>>;
1291
+ endpoint: z.ZodString;
1292
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1293
+ query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
1294
+ body: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1295
+ }, z.core.$strip>>, object, TelegramBotClient>): Promise<unknown>;
1296
+ }];
1297
+ readonly triggers: readonly [import("frogbot").PieceAppTrigger<z.ZodObject<{
1298
+ updateTypes: z.ZodDefault<z.ZodArray<z.ZodEnum<{
1299
+ message: "message";
1300
+ edited_message: "edited_message";
1301
+ channel_post: "channel_post";
1302
+ edited_channel_post: "edited_channel_post";
1303
+ callback_query: "callback_query";
1304
+ inline_query: "inline_query";
1305
+ chosen_inline_result: "chosen_inline_result";
1306
+ poll: "poll";
1307
+ poll_answer: "poll_answer";
1308
+ my_chat_member: "my_chat_member";
1309
+ chat_member: "chat_member";
1310
+ chat_join_request: "chat_join_request";
1311
+ }>>>;
1312
+ }, z.core.$strip>, z.ZodObject<{
1313
+ update_id: z.ZodOptional<z.ZodNumber>;
1314
+ }, z.core.$catchall<z.ZodType<import("frogbot").PieceJSON, unknown, z.core.$ZodTypeInternals<import("frogbot").PieceJSON, unknown>>>>, object, {
1315
+ fileUrl(path: string): string;
1316
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
1317
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
1318
+ downloadFile(path: string): Promise<string>;
1319
+ }>];
1320
+ }>;
46
1321
  //# sourceMappingURL=index.d.ts.map