@frogbotai/piece-telegram-bot 0.25.0 → 0.26.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.
Files changed (57) hide show
  1. package/dist/actions/index.d.ts +46 -46
  2. package/dist/adapter.d.ts +11 -0
  3. package/dist/adapter.d.ts.map +1 -0
  4. package/dist/adapter.js +41 -0
  5. package/dist/adapter.js.map +1 -0
  6. package/dist/client.d.ts +11 -0
  7. package/dist/client.d.ts.map +1 -1
  8. package/dist/client.js +27 -6
  9. package/dist/client.js.map +1 -1
  10. package/dist/files.d.ts +2 -2
  11. package/dist/index.d.ts +55 -49
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +5 -3
  14. package/dist/index.js.map +1 -1
  15. package/dist/questions/index.d.ts +4 -0
  16. package/dist/questions/index.d.ts.map +1 -0
  17. package/dist/questions/index.js +17 -0
  18. package/dist/questions/index.js.map +1 -0
  19. package/dist/questions/keyboard.d.ts +60 -0
  20. package/dist/questions/keyboard.d.ts.map +1 -0
  21. package/dist/questions/keyboard.js +195 -0
  22. package/dist/questions/keyboard.js.map +1 -0
  23. package/dist/questions/notify.d.ts +8 -0
  24. package/dist/questions/notify.d.ts.map +1 -0
  25. package/dist/questions/notify.js +49 -0
  26. package/dist/questions/notify.js.map +1 -0
  27. package/dist/questions/parse.d.ts +3 -0
  28. package/dist/questions/parse.d.ts.map +1 -0
  29. package/dist/questions/parse.js +87 -0
  30. package/dist/questions/parse.js.map +1 -0
  31. package/dist/questions/render.d.ts +4 -0
  32. package/dist/questions/render.d.ts.map +1 -0
  33. package/dist/questions/render.js +21 -0
  34. package/dist/questions/render.js.map +1 -0
  35. package/dist/questions/settled.d.ts +4 -0
  36. package/dist/questions/settled.d.ts.map +1 -0
  37. package/dist/questions/settled.js +18 -0
  38. package/dist/questions/settled.js.map +1 -0
  39. package/dist/questions/state.d.ts +17 -0
  40. package/dist/questions/state.d.ts.map +1 -0
  41. package/dist/questions/state.js +18 -0
  42. package/dist/questions/state.js.map +1 -0
  43. package/dist/questions/supports.d.ts +3 -0
  44. package/dist/questions/supports.d.ts.map +1 -0
  45. package/dist/questions/supports.js +2 -0
  46. package/dist/questions/supports.js.map +1 -0
  47. package/dist/questions/telegramThread.d.ts +19 -0
  48. package/dist/questions/telegramThread.d.ts.map +1 -0
  49. package/dist/questions/telegramThread.js +34 -0
  50. package/dist/questions/telegramThread.js.map +1 -0
  51. package/dist/questions/updated.d.ts +4 -0
  52. package/dist/questions/updated.d.ts.map +1 -0
  53. package/dist/questions/updated.js +31 -0
  54. package/dist/questions/updated.js.map +1 -0
  55. package/dist/triggers/newUpdate.d.ts +1 -1
  56. package/dist/webhook.d.ts +2 -2
  57. package/package.json +3 -3
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@ export declare const telegramBotTriggers: readonly ["newUpdate"];
6
6
  export declare const telegramBotScopes: readonly [];
7
7
  export declare const createTelegramBot: import("frogbot").PieceFactory<{
8
8
  readonly slug: "telegramBot";
9
- readonly label: "Telegram Bot";
9
+ readonly label: "Telegram";
10
10
  readonly admin: {
11
11
  readonly description: "Build chatbots and respond to Telegram updates";
12
12
  readonly group: "Communication";
@@ -36,8 +36,14 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
36
36
  botUsername?: string | undefined;
37
37
  allowedUserIds?: string[] | undefined;
38
38
  };
39
- }): import("@chat-adapter/telegram").TelegramAdapter;
39
+ }): import("./adapter.js").FrogBotTelegramAdapter;
40
40
  identity(): Promise<null>;
41
+ questions: import("frogbot/pieces").PieceChannelQuestions<{
42
+ fileUrl(path: string): string;
43
+ call(method: string, body?: unknown): Promise<import("./client.js").TelegramResponse>;
44
+ request(endpoint: string, request: import("./client.js").TelegramRequest): Promise<unknown>;
45
+ downloadFile(path: string): Promise<string>;
46
+ }>;
41
47
  };
42
48
  readonly actions: readonly [import("frogbot").PieceActionDefinition<z.ZodObject<{
43
49
  replyToMessageId: z.ZodOptional<z.ZodNumber>;
@@ -80,10 +86,10 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
80
86
  protectContent: z.ZodDefault<z.ZodBoolean>;
81
87
  chatId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
82
88
  mediaType: z.ZodEnum<{
89
+ animation: "animation";
83
90
  photo: "photo";
84
- video: "video";
85
91
  sticker: "sticker";
86
- animation: "animation";
92
+ video: "video";
87
93
  }>;
88
94
  media: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
89
95
  fileId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
@@ -107,7 +113,7 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
107
113
  disableNotification: boolean;
108
114
  protectContent: boolean;
109
115
  chatId: string | number;
110
- mediaType: "photo" | "video" | "sticker" | "animation";
116
+ mediaType: "animation" | "photo" | "sticker" | "video";
111
117
  media: string | {
112
118
  fileId: string | number;
113
119
  name?: string | undefined;
@@ -125,14 +131,14 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
125
131
  downloadFile(path: string): Promise<string>;
126
132
  };
127
133
  options: object;
128
- req: import("frogbot").FrogbotRequest;
134
+ req: import("frogbot").FrogBotRequest;
129
135
  }) => Promise<import("frogbot").PieceOption[]>;
130
136
  protectContent: (args: {
131
137
  input: Partial<{
132
138
  disableNotification: boolean;
133
139
  protectContent: boolean;
134
140
  chatId: string | number;
135
- mediaType: "photo" | "video" | "sticker" | "animation";
141
+ mediaType: "animation" | "photo" | "sticker" | "video";
136
142
  media: string | {
137
143
  fileId: string | number;
138
144
  name?: string | undefined;
@@ -150,14 +156,14 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
150
156
  downloadFile(path: string): Promise<string>;
151
157
  };
152
158
  options: object;
153
- req: import("frogbot").FrogbotRequest;
159
+ req: import("frogbot").FrogBotRequest;
154
160
  }) => Promise<import("frogbot").PieceOption[]>;
155
161
  chatId: (args: {
156
162
  input: Partial<{
157
163
  disableNotification: boolean;
158
164
  protectContent: boolean;
159
165
  chatId: string | number;
160
- mediaType: "photo" | "video" | "sticker" | "animation";
166
+ mediaType: "animation" | "photo" | "sticker" | "video";
161
167
  media: string | {
162
168
  fileId: string | number;
163
169
  name?: string | undefined;
@@ -175,14 +181,14 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
175
181
  downloadFile(path: string): Promise<string>;
176
182
  };
177
183
  options: object;
178
- req: import("frogbot").FrogbotRequest;
184
+ req: import("frogbot").FrogBotRequest;
179
185
  }) => Promise<import("frogbot").PieceOption[]>;
180
186
  mediaType: (args: {
181
187
  input: Partial<{
182
188
  disableNotification: boolean;
183
189
  protectContent: boolean;
184
190
  chatId: string | number;
185
- mediaType: "photo" | "video" | "sticker" | "animation";
191
+ mediaType: "animation" | "photo" | "sticker" | "video";
186
192
  media: string | {
187
193
  fileId: string | number;
188
194
  name?: string | undefined;
@@ -200,14 +206,14 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
200
206
  downloadFile(path: string): Promise<string>;
201
207
  };
202
208
  options: object;
203
- req: import("frogbot").FrogbotRequest;
209
+ req: import("frogbot").FrogBotRequest;
204
210
  }) => Promise<import("frogbot").PieceOption[]>;
205
211
  media: (args: {
206
212
  input: Partial<{
207
213
  disableNotification: boolean;
208
214
  protectContent: boolean;
209
215
  chatId: string | number;
210
- mediaType: "photo" | "video" | "sticker" | "animation";
216
+ mediaType: "animation" | "photo" | "sticker" | "video";
211
217
  media: string | {
212
218
  fileId: string | number;
213
219
  name?: string | undefined;
@@ -225,14 +231,14 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
225
231
  downloadFile(path: string): Promise<string>;
226
232
  };
227
233
  options: object;
228
- req: import("frogbot").FrogbotRequest;
234
+ req: import("frogbot").FrogBotRequest;
229
235
  }) => Promise<import("frogbot").PieceOption[]>;
230
236
  parseMode: (args: {
231
237
  input: Partial<{
232
238
  disableNotification: boolean;
233
239
  protectContent: boolean;
234
240
  chatId: string | number;
235
- mediaType: "photo" | "video" | "sticker" | "animation";
241
+ mediaType: "animation" | "photo" | "sticker" | "video";
236
242
  media: string | {
237
243
  fileId: string | number;
238
244
  name?: string | undefined;
@@ -250,14 +256,14 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
250
256
  downloadFile(path: string): Promise<string>;
251
257
  };
252
258
  options: object;
253
- req: import("frogbot").FrogbotRequest;
259
+ req: import("frogbot").FrogBotRequest;
254
260
  }) => Promise<import("frogbot").PieceOption[]>;
255
261
  replyToMessageId?: ((args: {
256
262
  input: Partial<{
257
263
  disableNotification: boolean;
258
264
  protectContent: boolean;
259
265
  chatId: string | number;
260
- mediaType: "photo" | "video" | "sticker" | "animation";
266
+ mediaType: "animation" | "photo" | "sticker" | "video";
261
267
  media: string | {
262
268
  fileId: string | number;
263
269
  name?: string | undefined;
@@ -275,14 +281,14 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
275
281
  downloadFile(path: string): Promise<string>;
276
282
  };
277
283
  options: object;
278
- req: import("frogbot").FrogbotRequest;
284
+ req: import("frogbot").FrogBotRequest;
279
285
  }) => Promise<import("frogbot").PieceOption[]>) | undefined;
280
286
  replyMarkup?: ((args: {
281
287
  input: Partial<{
282
288
  disableNotification: boolean;
283
289
  protectContent: boolean;
284
290
  chatId: string | number;
285
- mediaType: "photo" | "video" | "sticker" | "animation";
291
+ mediaType: "animation" | "photo" | "sticker" | "video";
286
292
  media: string | {
287
293
  fileId: string | number;
288
294
  name?: string | undefined;
@@ -300,14 +306,14 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
300
306
  downloadFile(path: string): Promise<string>;
301
307
  };
302
308
  options: object;
303
- req: import("frogbot").FrogbotRequest;
309
+ req: import("frogbot").FrogBotRequest;
304
310
  }) => Promise<import("frogbot").PieceOption[]>) | undefined;
305
311
  messageThreadId?: ((args: {
306
312
  input: Partial<{
307
313
  disableNotification: boolean;
308
314
  protectContent: boolean;
309
315
  chatId: string | number;
310
- mediaType: "photo" | "video" | "sticker" | "animation";
316
+ mediaType: "animation" | "photo" | "sticker" | "video";
311
317
  media: string | {
312
318
  fileId: string | number;
313
319
  name?: string | undefined;
@@ -325,14 +331,14 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
325
331
  downloadFile(path: string): Promise<string>;
326
332
  };
327
333
  options: object;
328
- req: import("frogbot").FrogbotRequest;
334
+ req: import("frogbot").FrogBotRequest;
329
335
  }) => Promise<import("frogbot").PieceOption[]>) | undefined;
330
336
  message?: ((args: {
331
337
  input: Partial<{
332
338
  disableNotification: boolean;
333
339
  protectContent: boolean;
334
340
  chatId: string | number;
335
- mediaType: "photo" | "video" | "sticker" | "animation";
341
+ mediaType: "animation" | "photo" | "sticker" | "video";
336
342
  media: string | {
337
343
  fileId: string | number;
338
344
  name?: string | undefined;
@@ -350,7 +356,7 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
350
356
  downloadFile(path: string): Promise<string>;
351
357
  };
352
358
  options: object;
353
- req: import("frogbot").FrogbotRequest;
359
+ req: import("frogbot").FrogBotRequest;
354
360
  }) => Promise<import("frogbot").PieceOption[]>) | undefined;
355
361
  }> | undefined;
356
362
  }, {
@@ -410,7 +416,7 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
410
416
  downloadFile(path: string): Promise<string>;
411
417
  };
412
418
  options: object;
413
- req: import("frogbot").FrogbotRequest;
419
+ req: import("frogbot").FrogBotRequest;
414
420
  }) => Promise<import("frogbot").PieceOption[]>;
415
421
  protectContent: (args: {
416
422
  input: Partial<{
@@ -434,7 +440,7 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
434
440
  downloadFile(path: string): Promise<string>;
435
441
  };
436
442
  options: object;
437
- req: import("frogbot").FrogbotRequest;
443
+ req: import("frogbot").FrogBotRequest;
438
444
  }) => Promise<import("frogbot").PieceOption[]>;
439
445
  chatId: (args: {
440
446
  input: Partial<{
@@ -458,7 +464,7 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
458
464
  downloadFile(path: string): Promise<string>;
459
465
  };
460
466
  options: object;
461
- req: import("frogbot").FrogbotRequest;
467
+ req: import("frogbot").FrogBotRequest;
462
468
  }) => Promise<import("frogbot").PieceOption[]>;
463
469
  document: (args: {
464
470
  input: Partial<{
@@ -482,7 +488,7 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
482
488
  downloadFile(path: string): Promise<string>;
483
489
  };
484
490
  options: object;
485
- req: import("frogbot").FrogbotRequest;
491
+ req: import("frogbot").FrogBotRequest;
486
492
  }) => Promise<import("frogbot").PieceOption[]>;
487
493
  parseMode: (args: {
488
494
  input: Partial<{
@@ -506,7 +512,7 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
506
512
  downloadFile(path: string): Promise<string>;
507
513
  };
508
514
  options: object;
509
- req: import("frogbot").FrogbotRequest;
515
+ req: import("frogbot").FrogBotRequest;
510
516
  }) => Promise<import("frogbot").PieceOption[]>;
511
517
  replyToMessageId?: ((args: {
512
518
  input: Partial<{
@@ -530,7 +536,7 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
530
536
  downloadFile(path: string): Promise<string>;
531
537
  };
532
538
  options: object;
533
- req: import("frogbot").FrogbotRequest;
539
+ req: import("frogbot").FrogBotRequest;
534
540
  }) => Promise<import("frogbot").PieceOption[]>) | undefined;
535
541
  replyMarkup?: ((args: {
536
542
  input: Partial<{
@@ -554,7 +560,7 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
554
560
  downloadFile(path: string): Promise<string>;
555
561
  };
556
562
  options: object;
557
- req: import("frogbot").FrogbotRequest;
563
+ req: import("frogbot").FrogBotRequest;
558
564
  }) => Promise<import("frogbot").PieceOption[]>) | undefined;
559
565
  messageThreadId?: ((args: {
560
566
  input: Partial<{
@@ -578,7 +584,7 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
578
584
  downloadFile(path: string): Promise<string>;
579
585
  };
580
586
  options: object;
581
- req: import("frogbot").FrogbotRequest;
587
+ req: import("frogbot").FrogBotRequest;
582
588
  }) => Promise<import("frogbot").PieceOption[]>) | undefined;
583
589
  caption?: ((args: {
584
590
  input: Partial<{
@@ -602,7 +608,7 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
602
608
  downloadFile(path: string): Promise<string>;
603
609
  };
604
610
  options: object;
605
- req: import("frogbot").FrogbotRequest;
611
+ req: import("frogbot").FrogBotRequest;
606
612
  }) => Promise<import("frogbot").PieceOption[]>) | undefined;
607
613
  }> | undefined;
608
614
  }, {
@@ -670,7 +676,7 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
670
676
  downloadFile(path: string): Promise<string>;
671
677
  };
672
678
  options: object;
673
- req: import("frogbot").FrogbotRequest;
679
+ req: import("frogbot").FrogBotRequest;
674
680
  }) => Promise<import("frogbot").PieceOption[]>;
675
681
  protectContent: (args: {
676
682
  input: Partial<{
@@ -698,7 +704,7 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
698
704
  downloadFile(path: string): Promise<string>;
699
705
  };
700
706
  options: object;
701
- req: import("frogbot").FrogbotRequest;
707
+ req: import("frogbot").FrogBotRequest;
702
708
  }) => Promise<import("frogbot").PieceOption[]>;
703
709
  chatId: (args: {
704
710
  input: Partial<{
@@ -726,7 +732,7 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
726
732
  downloadFile(path: string): Promise<string>;
727
733
  };
728
734
  options: object;
729
- req: import("frogbot").FrogbotRequest;
735
+ req: import("frogbot").FrogBotRequest;
730
736
  }) => Promise<import("frogbot").PieceOption[]>;
731
737
  audio: (args: {
732
738
  input: Partial<{
@@ -754,7 +760,7 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
754
760
  downloadFile(path: string): Promise<string>;
755
761
  };
756
762
  options: object;
757
- req: import("frogbot").FrogbotRequest;
763
+ req: import("frogbot").FrogBotRequest;
758
764
  }) => Promise<import("frogbot").PieceOption[]>;
759
765
  parseMode: (args: {
760
766
  input: Partial<{
@@ -782,7 +788,7 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
782
788
  downloadFile(path: string): Promise<string>;
783
789
  };
784
790
  options: object;
785
- req: import("frogbot").FrogbotRequest;
791
+ req: import("frogbot").FrogBotRequest;
786
792
  }) => Promise<import("frogbot").PieceOption[]>;
787
793
  replyToMessageId?: ((args: {
788
794
  input: Partial<{
@@ -810,7 +816,7 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
810
816
  downloadFile(path: string): Promise<string>;
811
817
  };
812
818
  options: object;
813
- req: import("frogbot").FrogbotRequest;
819
+ req: import("frogbot").FrogBotRequest;
814
820
  }) => Promise<import("frogbot").PieceOption[]>) | undefined;
815
821
  replyMarkup?: ((args: {
816
822
  input: Partial<{
@@ -838,7 +844,7 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
838
844
  downloadFile(path: string): Promise<string>;
839
845
  };
840
846
  options: object;
841
- req: import("frogbot").FrogbotRequest;
847
+ req: import("frogbot").FrogBotRequest;
842
848
  }) => Promise<import("frogbot").PieceOption[]>) | undefined;
843
849
  messageThreadId?: ((args: {
844
850
  input: Partial<{
@@ -866,7 +872,7 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
866
872
  downloadFile(path: string): Promise<string>;
867
873
  };
868
874
  options: object;
869
- req: import("frogbot").FrogbotRequest;
875
+ req: import("frogbot").FrogBotRequest;
870
876
  }) => Promise<import("frogbot").PieceOption[]>) | undefined;
871
877
  caption?: ((args: {
872
878
  input: Partial<{
@@ -894,7 +900,7 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
894
900
  downloadFile(path: string): Promise<string>;
895
901
  };
896
902
  options: object;
897
- req: import("frogbot").FrogbotRequest;
903
+ req: import("frogbot").FrogBotRequest;
898
904
  }) => Promise<import("frogbot").PieceOption[]>) | undefined;
899
905
  duration?: ((args: {
900
906
  input: Partial<{
@@ -922,7 +928,7 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
922
928
  downloadFile(path: string): Promise<string>;
923
929
  };
924
930
  options: object;
925
- req: import("frogbot").FrogbotRequest;
931
+ req: import("frogbot").FrogBotRequest;
926
932
  }) => Promise<import("frogbot").PieceOption[]>) | undefined;
927
933
  performer?: ((args: {
928
934
  input: Partial<{
@@ -950,7 +956,7 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
950
956
  downloadFile(path: string): Promise<string>;
951
957
  };
952
958
  options: object;
953
- req: import("frogbot").FrogbotRequest;
959
+ req: import("frogbot").FrogBotRequest;
954
960
  }) => Promise<import("frogbot").PieceOption[]>) | undefined;
955
961
  title?: ((args: {
956
962
  input: Partial<{
@@ -978,7 +984,7 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
978
984
  downloadFile(path: string): Promise<string>;
979
985
  };
980
986
  options: object;
981
- req: import("frogbot").FrogbotRequest;
987
+ req: import("frogbot").FrogBotRequest;
982
988
  }) => Promise<import("frogbot").PieceOption[]>) | undefined;
983
989
  thumbnail?: ((args: {
984
990
  input: Partial<{
@@ -1006,7 +1012,7 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
1006
1012
  downloadFile(path: string): Promise<string>;
1007
1013
  };
1008
1014
  options: object;
1009
- req: import("frogbot").FrogbotRequest;
1015
+ req: import("frogbot").FrogBotRequest;
1010
1016
  }) => Promise<import("frogbot").PieceOption[]>) | undefined;
1011
1017
  }> | undefined;
1012
1018
  }, import("frogbot").PieceActionDefinition<z.ZodObject<{
@@ -1037,10 +1043,10 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
1037
1043
  chatId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
1038
1044
  media: z.ZodArray<z.ZodObject<{
1039
1045
  type: z.ZodEnum<{
1046
+ audio: "audio";
1047
+ document: "document";
1040
1048
  photo: "photo";
1041
1049
  video: "video";
1042
- document: "document";
1043
- audio: "audio";
1044
1050
  }>;
1045
1051
  media: z.ZodString;
1046
1052
  caption: z.ZodOptional<z.ZodString>;
@@ -1300,10 +1306,10 @@ export declare const createTelegramBot: import("frogbot").PieceFactory<{
1300
1306
  edited_message: "edited_message";
1301
1307
  channel_post: "channel_post";
1302
1308
  edited_channel_post: "edited_channel_post";
1309
+ poll: "poll";
1303
1310
  callback_query: "callback_query";
1304
1311
  inline_query: "inline_query";
1305
1312
  chosen_inline_result: "chosen_inline_result";
1306
- poll: "poll";
1307
1313
  poll_answer: "poll_answer";
1308
1314
  my_chat_member: "my_chat_member";
1309
1315
  chat_member: "chat_member";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAuB7B,OAAO,EAAE,uBAAuB,EAAE,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAG9E,OAAO,EAAwB,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAE3E,eAAO,MAAM,kBAAkB,+TAoBrB,CAAC;AACX,eAAO,MAAM,mBAAmB,wBAAyB,CAAC;AAC1D,eAAO,MAAM,iBAAiB,aAAc,CAAC;AAgC7C,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAgCy2R,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAD74R,CAAC"}
package/dist/index.js CHANGED
@@ -1,8 +1,9 @@
1
- import { createTelegramAdapter } from '@chat-adapter/telegram';
2
1
  import { definePiece } from 'frogbot/pieces';
3
2
  import { answerCallbackQuery, createInviteLink, customApiCall, deleteMessage, editMessageText, forwardMessage, getChat, getChatMember, getFile, pinMessage, sendAudio, sendChatAction, sendDocument, sendLocation, sendMedia, sendMediaGroup, sendPoll, sendTextMessage, unpinMessage, } from './actions/index.js';
3
+ import { createFrogBotTelegramAdapter } from './adapter.js';
4
4
  import { createTelegramBotClient } from './client.js';
5
5
  import { telegramBotAuth, telegramBotOptions } from './config.js';
6
+ import { telegramQuestions } from './questions/index.js';
6
7
  import { newUpdate } from './triggers/newUpdate.js';
7
8
  import { parseTelegramWebhook, verifyTelegramWebhook } from './webhook.js';
8
9
  export const telegramBotActions = [
@@ -39,7 +40,7 @@ const telegramBotChannel = {
39
40
  if (!options.webhookSecret) {
40
41
  throw new Error('Telegram channels require a webhookSecret option.');
41
42
  }
42
- return createTelegramAdapter({
43
+ return createFrogBotTelegramAdapter({
43
44
  botToken: auth.botToken,
44
45
  secretToken: options.webhookSecret,
45
46
  userName: options.botUsername,
@@ -50,10 +51,11 @@ const telegramBotChannel = {
50
51
  async identity() {
51
52
  return null;
52
53
  },
54
+ questions: telegramQuestions,
53
55
  };
54
56
  export const createTelegramBot = definePiece({
55
57
  slug: 'telegramBot',
56
- label: 'Telegram Bot',
58
+ label: 'Telegram',
57
59
  admin: { description: 'Build chatbots and respond to Telegram updates', group: 'Communication' },
58
60
  auth: telegramBotAuth,
59
61
  options: telegramBotOptions,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAwC,MAAM,gBAAgB,CAAC;AAGnF,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,eAAe,EACf,cAAc,EACd,OAAO,EACP,aAAa,EACb,OAAO,EACP,UAAU,EACV,SAAS,EACT,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,cAAc,EACd,QAAQ,EACR,eAAe,EACf,YAAY,GACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,uBAAuB,EAA0B,MAAM,aAAa,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAE3E,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,iBAAiB;IACjB,WAAW;IACX,cAAc;IACd,WAAW;IACX,cAAc;IACd,gBAAgB;IAChB,UAAU;IACV,gBAAgB;IAChB,iBAAiB;IACjB,eAAe;IACf,gBAAgB;IAChB,YAAY;IACZ,cAAc;IACd,SAAS;IACT,eAAe;IACf,SAAS;IACT,kBA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;CACtB,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { PieceChannelQuestions } from 'frogbot/pieces';
2
+ import type { TelegramBotClient } from '../client.js';
3
+ export declare const telegramQuestions: PieceChannelQuestions<TelegramBotClient>;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/questions/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAE5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAQtD,eAAO,MAAM,iBAAiB,EAAE,qBAAqB,CAAC,iBAAiB,CAStE,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { denyTelegramQuestion, rejectTelegramQuestion, staleTelegramQuestion } from './notify.js';
2
+ import { parseTelegramQuestion } from './parse.js';
3
+ import { renderTelegramQuestion } from './render.js';
4
+ import { settleTelegramQuestion } from './settled.js';
5
+ import { supportsTelegramQuestion } from './supports.js';
6
+ import { updateTelegramQuestion } from './updated.js';
7
+ export const telegramQuestions = {
8
+ supports: supportsTelegramQuestion,
9
+ render: renderTelegramQuestion,
10
+ parse: parseTelegramQuestion,
11
+ settled: settleTelegramQuestion,
12
+ updated: updateTelegramQuestion,
13
+ rejected: rejectTelegramQuestion,
14
+ denied: denyTelegramQuestion,
15
+ stale: staleTelegramQuestion,
16
+ };
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/questions/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAClG,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAEtD,MAAM,CAAC,MAAM,iBAAiB,GAA6C;IACzE,QAAQ,EAAE,wBAAwB;IAClC,MAAM,EAAE,sBAAsB;IAC9B,KAAK,EAAE,qBAAqB;IAC5B,OAAO,EAAE,sBAAsB;IAC/B,OAAO,EAAE,sBAAsB;IAC/B,QAAQ,EAAE,sBAAsB;IAChC,MAAM,EAAE,oBAAoB;IAC5B,KAAK,EAAE,qBAAqB;CAC7B,CAAC"}
@@ -0,0 +1,60 @@
1
+ import type { ChannelQuestionCall, QuestionInput } from 'frogbot/pieces';
2
+ import type { TelegramQuestionAnswer, TelegramQuestionState } from './state.js';
3
+ export declare const OPTIONS_PER_PAGE = 10;
4
+ export declare const TEXT_BUDGET = 3500;
5
+ type QuestionItem = QuestionInput['questions'][number];
6
+ export type TelegramButton = {
7
+ text: string;
8
+ callback_data: string;
9
+ };
10
+ export type TelegramMessageBody = {
11
+ text: string;
12
+ parse_mode: 'HTML';
13
+ link_preview_options: {
14
+ is_disabled: true;
15
+ };
16
+ reply_markup: {
17
+ inline_keyboard: TelegramButton[][];
18
+ };
19
+ };
20
+ export type TelegramQuestionAction = {
21
+ kind: 'choose' | 'toggle';
22
+ q: number;
23
+ index: number;
24
+ } | {
25
+ kind: 'page';
26
+ q: number;
27
+ page: number;
28
+ } | {
29
+ kind: 'done' | 'type' | 'back';
30
+ q: number;
31
+ } | {
32
+ kind: 'dismiss';
33
+ };
34
+ export declare const actionIds: {
35
+ choose: (q: number, index: number) => string;
36
+ toggle: (q: number, index: number) => string;
37
+ page: (q: number, page: number) => string;
38
+ done: (q: number) => string;
39
+ type: (q: number) => string;
40
+ back: (q: number) => string;
41
+ dismiss: string;
42
+ };
43
+ export declare function decodeAction(data: string | undefined): TelegramQuestionAction | undefined;
44
+ export declare function optionPages(item: QuestionItem): number[][];
45
+ export declare function questionMessage({ call, state, }: {
46
+ call: ChannelQuestionCall;
47
+ state: TelegramQuestionState;
48
+ }): TelegramMessageBody;
49
+ export declare function settledMessage({ actor, answers, call, }: {
50
+ actor?: string;
51
+ answers?: TelegramQuestionAnswer[];
52
+ call: ChannelQuestionCall;
53
+ }): TelegramMessageBody;
54
+ export declare function selectedLabels({ item, selected, }: {
55
+ item: QuestionItem;
56
+ selected: number[];
57
+ }): string[];
58
+ export declare function escapeHTML(value: string): string;
59
+ export {};
60
+ //# sourceMappingURL=keyboard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyboard.d.ts","sourceRoot":"","sources":["../../src/questions/keyboard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEzE,OAAO,KAAK,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAEhF,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,eAAO,MAAM,WAAW,OAAO,CAAC;AAYhC,KAAK,YAAY,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAKvD,MAAM,MAAM,cAAc,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC;AAErE,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,oBAAoB,EAAE;QAAE,WAAW,EAAE,IAAI,CAAA;KAAE,CAAC;IAC5C,YAAY,EAAE;QAAE,eAAe,EAAE,cAAc,EAAE,EAAE,CAAA;KAAE,CAAC;CACvD,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAC9B;IAAE,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACvD;IAAE,IAAI,EAAE,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