gramstax 0.0.1 → 0.0.2

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 (62) hide show
  1. package/dist/src/index.cjs +2 -0
  2. package/dist/src/index.cjs.map +1 -0
  3. package/dist/src/{core/bot.d.ts → index.d.cts} +500 -12
  4. package/dist/src/index.d.ts +1292 -5
  5. package/dist/src/index.js +2 -4
  6. package/dist/src/index.js.map +1 -0
  7. package/package.json +10 -9
  8. package/dist/package.json +0 -52
  9. package/dist/src/base/general.d.ts +0 -7
  10. package/dist/src/base/general.d.ts.map +0 -1
  11. package/dist/src/base/general.js +0 -15
  12. package/dist/src/base/guard.d.ts +0 -13
  13. package/dist/src/base/guard.d.ts.map +0 -1
  14. package/dist/src/base/guard.js +0 -8
  15. package/dist/src/base/index.d.ts +0 -4
  16. package/dist/src/base/index.d.ts.map +0 -1
  17. package/dist/src/base/index.js +0 -3
  18. package/dist/src/base/page.d.ts +0 -263
  19. package/dist/src/base/page.d.ts.map +0 -1
  20. package/dist/src/base/page.js +0 -805
  21. package/dist/src/cache/external.d.ts +0 -10
  22. package/dist/src/cache/external.d.ts.map +0 -1
  23. package/dist/src/cache/external.js +0 -16
  24. package/dist/src/cache/index.d.ts +0 -2
  25. package/dist/src/cache/index.d.ts.map +0 -1
  26. package/dist/src/cache/index.js +0 -1
  27. package/dist/src/core/bot.d.ts.map +0 -1
  28. package/dist/src/core/bot.js +0 -465
  29. package/dist/src/core/ctx.d.ts +0 -60
  30. package/dist/src/core/ctx.d.ts.map +0 -1
  31. package/dist/src/core/ctx.js +0 -175
  32. package/dist/src/core/index.d.ts +0 -3
  33. package/dist/src/core/index.d.ts.map +0 -1
  34. package/dist/src/core/index.js +0 -2
  35. package/dist/src/grammy/index.d.ts +0 -2
  36. package/dist/src/grammy/index.d.ts.map +0 -1
  37. package/dist/src/grammy/index.js +0 -1
  38. package/dist/src/index.d.ts.map +0 -1
  39. package/dist/src/template/engine.d.ts +0 -34
  40. package/dist/src/template/engine.d.ts.map +0 -1
  41. package/dist/src/template/engine.js +0 -122
  42. package/dist/src/template/index.d.ts +0 -3
  43. package/dist/src/template/index.d.ts.map +0 -1
  44. package/dist/src/template/index.js +0 -2
  45. package/dist/src/template/manager.d.ts +0 -111
  46. package/dist/src/template/manager.d.ts.map +0 -1
  47. package/dist/src/template/manager.js +0 -237
  48. package/src/base/general.ts +0 -17
  49. package/src/base/guard.ts +0 -10
  50. package/src/base/index.ts +0 -3
  51. package/src/base/page.ts +0 -1111
  52. package/src/cache/external.ts +0 -15
  53. package/src/cache/index.ts +0 -1
  54. package/src/core/bot.ts +0 -535
  55. package/src/core/ctx.ts +0 -177
  56. package/src/core/index.ts +0 -2
  57. package/src/grammy/index.ts +0 -1
  58. package/src/index.ts +0 -4
  59. package/src/template/engine.ts +0 -167
  60. package/src/template/index.ts +0 -2
  61. package/src/template/manager.ts +0 -280
  62. package/src/types/page.d.ts +0 -4
@@ -1,5 +1,1292 @@
1
- export * from "./base";
2
- export * from "./cache";
3
- export * from "./core";
4
- export * from "./template";
5
- //# sourceMappingURL=index.d.ts.map
1
+ import LoggingPretty, { LoggingPretty as LoggingPretty$1 } from 'logging-pretty';
2
+ import * as grammy_types from 'grammy/types';
3
+ import { UserFromGetMe } from 'grammy/types';
4
+ import { Keyv } from 'keyv';
5
+ import { FSWatcher } from 'chokidar';
6
+ import { Context, Keyboard, InlineKeyboard, Bot, BotError } from 'grammy';
7
+
8
+ declare abstract class BaseGeneral {
9
+ protected static log: LoggingPretty;
10
+ protected static logError(error: any, func: string): void;
11
+ protected logError(error: any, constructorName?: string, funcName?: string): void;
12
+ }
13
+
14
+ type IMore = Omit<Required<ConstructorParameters<typeof Keyv>>[0], `store` | `namespace` | `ttl`> & {
15
+ forceStore?: any;
16
+ };
17
+ declare class CacheExternal extends Keyv {
18
+ url: string | `memory`;
19
+ constructor(url?: string | `memory`, namespace?: string, ttl?: number, more?: IMore);
20
+ }
21
+
22
+ declare class TemplateEngine {
23
+ static _escape(str: string): string;
24
+ static _processVariables(template: string): string;
25
+ static _processBaseBlocks(template: string): {
26
+ [baseId: string]: string;
27
+ };
28
+ static _processScriptBlocks(template: string): string;
29
+ static _processSpaceBlocks(template: string): string;
30
+ static _processDivBlocks(template: string): string;
31
+ static _processMessageBlocks(template: string): {
32
+ [lang: string]: string;
33
+ };
34
+ static _processKeyboardBlocks(template: string): {
35
+ [lang: string]: {
36
+ inline?: string;
37
+ default?: string;
38
+ };
39
+ };
40
+ static _compileToFunction<T extends boolean>(template: T extends true ? string[] : string, isArray: T): T extends true ? (data?: Record<string, any>) => string[] : (data?: Record<string, any>) => string;
41
+ static compileMessages(template: string): {
42
+ [baseId: string]: {
43
+ [lang: string]: (data?: Record<string, any>) => string;
44
+ };
45
+ };
46
+ static compileKeyboards(template: string): {
47
+ [baseId: string]: {
48
+ [lang: string]: {
49
+ inline?: (data?: Record<string, any>) => string[];
50
+ default?: (data?: Record<string, any>) => string[];
51
+ };
52
+ };
53
+ };
54
+ }
55
+
56
+ /** Template file interface for better type safety */
57
+ type ICompiledTemplate = {
58
+ message: ReturnType<typeof TemplateEngine.compileMessages>;
59
+ keyboard: ReturnType<typeof TemplateEngine.compileKeyboards>;
60
+ };
61
+ /** Template loading options */
62
+ type ITemplateOptions = {
63
+ /** Enable file watching for hot reloading (if have templatePath) */
64
+ enableWatch?: boolean;
65
+ /** Base path for template files (set null if dont want read template from file) */
66
+ path?: string | undefined | null;
67
+ /** Force language params to this value */
68
+ forceLanguage?: string | undefined | null;
69
+ };
70
+ /** Template management system */
71
+ declare class TemplateManager {
72
+ _map: Map<string, ICompiledTemplate>;
73
+ _engine: typeof TemplateEngine;
74
+ _watcher: FSWatcher | null;
75
+ _supportedExtensions: Set<string>;
76
+ readonly _path: string | null;
77
+ readonly _forceLanguage: string | null;
78
+ readonly _isWatchEnabled: boolean;
79
+ constructor(options?: ITemplateOptions);
80
+ /** Validate and ensure template directory exists. @returns Void */
81
+ _validatePath(): void;
82
+ /** Initialize file system watcher for hot reloading. @returns Void */
83
+ _initializeWatcher(): void;
84
+ /** Handle file change events */
85
+ _handleFileChange(filepath: string): Promise<void>;
86
+ /** Handle file add events */
87
+ _handleFileAdd(filePath: string): Promise<void>;
88
+ /** Handle file delete events */
89
+ _handleFileDelete(filePath: string): void;
90
+ /** Handle watcher errors */
91
+ _handleWatchError(error: any): void;
92
+ /** Load all Template files during initialization */
93
+ _loadAllFiles(): void;
94
+ /** Load and compile a single template file */
95
+ _loadFile(filename: string, useSync?: boolean): Promise<void>;
96
+ _isValidFile(filename: string): boolean;
97
+ _getKey(filename: string): string;
98
+ compile(key: string, rawTemplate: string, keepIfExist?: Partial<{
99
+ [K in keyof ICompiledTemplate]: boolean;
100
+ }>): void;
101
+ /**
102
+ * Get compiled message template
103
+ * @param key Template identifier (filename without extension)
104
+ * @param baseId Base id attr from block
105
+ * @param language Target language code
106
+ * @param data Template variables
107
+ * @returns Rendered message string
108
+ */
109
+ getMessage(key: string, baseId?: string, language?: string, data?: Record<string, any>): string;
110
+ /**
111
+ * Get compiled keyboard template
112
+ * @param key Template identifier (filename without extension)
113
+ * @param baseId Base id attr from block
114
+ * @param language Target language code
115
+ * @param data Template variables
116
+ * @returns Array of rendered button labels
117
+ */
118
+ getKeyboard(key: string, baseId?: string, language?: string, display?: `inline` | `default`, data?: Record<string, any>): string[];
119
+ /**
120
+ * Update message template in memory
121
+ * @param key Template identifier (filename without extension)
122
+ * @param rawTemplate Raw template string
123
+ */
124
+ setMessage(key: string, rawTemplate: string): void;
125
+ /**
126
+ * Update keyboard template in memory
127
+ * @param key Template identifier (filename without extension)
128
+ * @param rawTemplate Raw template string
129
+ */
130
+ setKeyboard(key: string, rawTemplate: string): void;
131
+ /**
132
+ * Write template to file and update cache
133
+ * @param filename Target filename (with extension)
134
+ * @param rawTemplate Template to write
135
+ * @returns Promise that resolves when file is written
136
+ */
137
+ write(filename: string, rawTemplate: string): Promise<void>;
138
+ /**
139
+ * Get list of available template
140
+ * @returns Array of template names
141
+ */
142
+ getAvailable(): string[];
143
+ /**
144
+ * Check if template exists
145
+ * @param key Template identifier
146
+ * @returns True if template exists
147
+ */
148
+ has(key: string): boolean;
149
+ /**
150
+ * Get cache statistics
151
+ * @returns Object with cache information
152
+ */
153
+ getCacheStats(): {
154
+ templateCount: number;
155
+ totalSize: number;
156
+ };
157
+ /**
158
+ * Cleanup resources and close watchers
159
+ * @returns Promise void
160
+ */
161
+ destroy(): Promise<void>;
162
+ }
163
+
164
+ declare class Ctx extends BaseGeneral {
165
+ ct: Context;
166
+ templateManager: TemplateManager;
167
+ cacheSession: CacheExternal;
168
+ cacheKeyboard: Map<any, any>;
169
+ data: {
170
+ name: string;
171
+ callbackData: (...args: any) => string | any;
172
+ };
173
+ get isPremium(): boolean;
174
+ get isBot(): boolean;
175
+ get userid(): number;
176
+ get username(): string;
177
+ get fullname(): string;
178
+ get firstname(): string;
179
+ get lastname(): string;
180
+ get msgText(): string;
181
+ get msgTextIntent(): string;
182
+ get msgTextPayloads(): any[];
183
+ get msgTextPayload(): string;
184
+ get msgCaption(): string;
185
+ get msgCaptionIntent(): string;
186
+ get msgPhoto(): grammy_types.PhotoSize[] | undefined;
187
+ get msgVideo(): grammy_types.Video | undefined;
188
+ get msgAudio(): grammy_types.Audio | undefined;
189
+ get callbackData(): string;
190
+ get callbackDataIntent(): string;
191
+ get callbackDataPayloads(): any[];
192
+ get callbackDataPayload(): string;
193
+ get callbackDataParts(): any[];
194
+ get languageCode(): any;
195
+ set languageCode(v: any);
196
+ session: {
197
+ method?: string;
198
+ params?: any;
199
+ };
200
+ constructor(ct: Context, templateManager: TemplateManager, cacheSession: CacheExternal, cacheKeyboard: Map<any, any>);
201
+ broadcast(ids: any[], languageCode: any[], keyboard?: Keyboard | InlineKeyboard, data?: Record<string, any>, baseId?: string, options?: any): Promise<void>;
202
+ reply(keyboard?: Keyboard | InlineKeyboard, data?: Record<string, any>, baseId?: string, options?: any): Promise<grammy_types.Message.TextMessage>;
203
+ replyAction(type: Parameters<typeof this$1.ct.replyWithChatAction>[0]): Promise<true>;
204
+ edit(keyboard?: Keyboard | InlineKeyboard, data?: Record<string, any>, baseId?: string, options?: any): Promise<true | (grammy_types.Update.Edited & grammy_types.Message.CommonMessage & {
205
+ text: string;
206
+ } & Partial<{
207
+ entities: grammy_types.MessageEntity[];
208
+ }>) | undefined>;
209
+ delete(): Promise<true>;
210
+ callbackQueryAnswer(options?: any): Promise<true | null>;
211
+ sessionSet(method: string, params: any, ...moreRoot: any): Promise<boolean | null>;
212
+ sessionGet(): Promise<{
213
+ method: string;
214
+ params: any;
215
+ [moreRoot: string]: any;
216
+ } | null>;
217
+ sessionClear(): Promise<boolean | null>;
218
+ }
219
+
220
+ declare abstract class BasePage extends Ctx {
221
+ static template?: string;
222
+ static data: {
223
+ name: string;
224
+ callbackData: (...args: any) => string | any;
225
+ };
226
+ transition?(...args: any): Promise<void>;
227
+ internal?(...args: any): Promise<void>;
228
+ notify?(...args: any): Promise<void>;
229
+ callback?(): Promise<void>;
230
+ callbackPayload?(): Promise<void>;
231
+ text?(): Promise<void>;
232
+ textPayload?(): Promise<void>;
233
+ textCommand?(): Promise<void>;
234
+ textCommandPayload?(): Promise<void>;
235
+ textFree?(): Promise<void>;
236
+ photoCaption?(): Promise<void>;
237
+ photoCaptionPayload?(): Promise<void>;
238
+ photoCaptionCommand?(): Promise<void>;
239
+ photoCaptionCommandPayload?(): Promise<void>;
240
+ photoFree?(): Promise<void>;
241
+ videoCaption?(): Promise<void>;
242
+ videoCaptionPayload?(): Promise<void>;
243
+ videoCaptionCommand?(): Promise<void>;
244
+ videoCaptionCommandPayload?(): Promise<void>;
245
+ videoFree?(): Promise<void>;
246
+ audioCaption?(): Promise<void>;
247
+ audioCaptionPayload?(): Promise<void>;
248
+ audioCaptionCommand?(): Promise<void>;
249
+ audioCaptionCommandPayload?(): Promise<void>;
250
+ audioFree?(): Promise<void>;
251
+ documentCaption?(): Promise<void>;
252
+ documentCaptionPayload?(): Promise<void>;
253
+ documentCaptionCommand?(): Promise<void>;
254
+ documentCaptionCommandPayload?(): Promise<void>;
255
+ documentFree?(): Promise<void>;
256
+ animationCaption?(): Promise<void>;
257
+ animationCaptionPayload?(): Promise<void>;
258
+ animationCaptionCommand?(): Promise<void>;
259
+ animationCaptionCommandPayload?(): Promise<void>;
260
+ animationFree?(): Promise<void>;
261
+ voiceCaption?(): Promise<void>;
262
+ voiceCaptionPayload?(): Promise<void>;
263
+ voiceCaptionCommand?(): Promise<void>;
264
+ voiceCaptionCommandPayload?(): Promise<void>;
265
+ voiceFree?(): Promise<void>;
266
+ videoNoteCaption?(): Promise<void>;
267
+ videoNoteCaptionPayload?(): Promise<void>;
268
+ videoNoteCaptionCommand?(): Promise<void>;
269
+ videoNoteCaptionCommandPayload?(): Promise<void>;
270
+ videoNoteFree?(): Promise<void>;
271
+ stickerFree?(): Promise<void>;
272
+ locationFree?(): Promise<void>;
273
+ contactFree?(): Promise<void>;
274
+ free?(): Promise<void>;
275
+ ctx: Ctx;
276
+ constructor(ctx: Ctx & {
277
+ ctx?: Ctx;
278
+ });
279
+ static buildData<C extends ((...args: any[]) => any) | undefined = undefined>(callback?: C): {
280
+ name: string;
281
+ callbackData: ((this: {
282
+ name: string;
283
+ }, ...args: Parameters<Exclude<C, undefined>>) => ReturnType<Exclude<C, undefined>>) | ((this: {
284
+ name: string;
285
+ }) => string);
286
+ };
287
+ buildInlineKeyboard(callback: (kb: InlineKeyboard, arr: any[]) => InlineKeyboard, params?: {
288
+ baseId?: any;
289
+ data?: Record<string, any>;
290
+ cache?: boolean;
291
+ }): InlineKeyboard;
292
+ buildKeyboard(callback: (kb: Keyboard, arr: any[]) => Keyboard, params?: {
293
+ baseId?: any;
294
+ data?: Record<string, any>;
295
+ cache?: boolean;
296
+ }): Keyboard;
297
+ validateSessionCallback(method?: string, name?: string): boolean;
298
+ validateSessionCallbackPayload(method?: string, name?: string): boolean;
299
+ validateSessionText(method?: string, name?: string): boolean;
300
+ validateSessionTextPayload(method?: string, name?: string): boolean;
301
+ validateSessionTextCommand(method?: string, name?: string): boolean;
302
+ validateSessionTextCommandPayload(method?: string, name?: string): boolean;
303
+ validateSessionTextFree(method?: string, name?: string): boolean;
304
+ validateSessionPhotoCaption(method?: string, name?: string): boolean;
305
+ validateSessionPhotoCaptionPayload(method?: string, name?: string): boolean;
306
+ validateSessionPhotoCaptionCommand(method?: string, name?: string): boolean;
307
+ validateSessionPhotoCaptionCommandPayload(method?: string, name?: string): boolean;
308
+ validateSessionPhotoFree(method?: string, name?: string): boolean;
309
+ validateSessionVideoCaption(method?: string, name?: string): boolean;
310
+ validateSessionVideoCaptionPayload(method?: string, name?: string): boolean;
311
+ validateSessionVideoCaptionCommand(method?: string, name?: string): boolean;
312
+ validateSessionVideoCaptionCommandPayload(method?: string, name?: string): boolean;
313
+ validateSessionVideoFree(method?: string, name?: string): boolean;
314
+ validateSessionAudioCaption(method?: string, name?: string): boolean;
315
+ validateSessionAudioCaptionPayload(method?: string, name?: string): boolean;
316
+ validateSessionAudioCaptionCommand(method?: string, name?: string): boolean;
317
+ validateSessionAudioCaptionCommandPayload(method?: string, name?: string): boolean;
318
+ validateSessionAudioFree(method?: string, name?: string): boolean;
319
+ validateSessionDocumentCaption(method?: string, name?: string): boolean;
320
+ validateSessionDocumentCaptionPayload(method?: string, name?: string): boolean;
321
+ validateSessionDocumentCaptionCommand(method?: string, name?: string): boolean;
322
+ validateSessionDocumentCaptionCommandPayload(method?: string, name?: string): boolean;
323
+ validateSessionDocumentFree(method?: string, name?: string): boolean;
324
+ validateSessionAnimationCaption(method?: string, name?: string): boolean;
325
+ validateSessionAnimationCaptionPayload(method?: string, name?: string): boolean;
326
+ validateSessionAnimationCaptionCommand(method?: string, name?: string): boolean;
327
+ validateSessionAnimationCaptionCommandPayload(method?: string, name?: string): boolean;
328
+ validateSessionAnimationFree(method?: string, name?: string): boolean;
329
+ validateSessionVoiceCaption(method?: string, name?: string): boolean;
330
+ validateSessionVoiceCaptionPayload(method?: string, name?: string): boolean;
331
+ validateSessionVoiceCaptionCommand(method?: string, name?: string): boolean;
332
+ validateSessionVoiceCaptionCommandPayload(method?: string, name?: string): boolean;
333
+ validateSessionVoiceFree(method?: string, name?: string): boolean;
334
+ validateSessionVideoNoteCaption(method?: string, name?: string): boolean;
335
+ validateSessionVideoNoteCaptionPayload(method?: string, name?: string): boolean;
336
+ validateSessionVideoNoteCaptionCommand(method?: string, name?: string): boolean;
337
+ validateSessionVideoNoteCaptionCommandPayload(method?: string, name?: string): boolean;
338
+ validateSessionVideoNoteFree(method?: string, name?: string): boolean;
339
+ validateSessionStickerFree(method?: string, name?: string): boolean;
340
+ validateSessionLocationFree(method?: string, name?: string): boolean;
341
+ validateSessionContactFree(method?: string, name?: string): boolean;
342
+ sessionCallback(params?: any, name?: string): Promise<boolean | null>;
343
+ sessionCallbackPayload(params?: any, name?: string): Promise<boolean | null>;
344
+ sessionText(params?: any, name?: string): Promise<boolean | null>;
345
+ sessionTextPayload(params?: any, name?: string): Promise<boolean | null>;
346
+ sessionTextCommand(params?: any, name?: string): Promise<boolean | null>;
347
+ sessionTextCommandPayload(params?: any, name?: string): Promise<boolean | null>;
348
+ sessionTextFree(params?: any, name?: string): Promise<boolean | null>;
349
+ sessionPhotoCaption(params?: any, name?: string): Promise<boolean | null>;
350
+ sessionPhotoCaptionPayload(params?: any, name?: string): Promise<boolean | null>;
351
+ sessionPhotoCaptionCommand(params?: any, name?: string): Promise<boolean | null>;
352
+ sessionPhotoCaptionCommandPayload(params?: any, name?: string): Promise<boolean | null>;
353
+ sessionPhotoFree(params?: any, name?: string): Promise<boolean | null>;
354
+ sessionVideoCaption(params?: any, name?: string): Promise<boolean | null>;
355
+ sessionVideoCaptionPayload(params?: any, name?: string): Promise<boolean | null>;
356
+ sessionVideoCaptionCommand(params?: any, name?: string): Promise<boolean | null>;
357
+ sessionVideoCaptionCommandPayload(params?: any, name?: string): Promise<boolean | null>;
358
+ sessionVideoFree(params?: any, name?: string): Promise<boolean | null>;
359
+ sessionAudioCaption(params?: any, name?: string): Promise<boolean | null>;
360
+ sessionAudioCaptionPayload(params?: any, name?: string): Promise<boolean | null>;
361
+ sessionAudioCaptionCommand(params?: any, name?: string): Promise<boolean | null>;
362
+ sessionAudioCaptionCommandPayload(params?: any, name?: string): Promise<boolean | null>;
363
+ sessionAudioFree(params?: any, name?: string): Promise<boolean | null>;
364
+ sessionDocumentCaption(params?: any, name?: string): Promise<boolean | null>;
365
+ sessionDocumentCaptionPayload(params?: any, name?: string): Promise<boolean | null>;
366
+ sessionDocumentCaptionCommand(params?: any, name?: string): Promise<boolean | null>;
367
+ sessionDocumentCaptionCommandPayload(params?: any, name?: string): Promise<boolean | null>;
368
+ sessionDocumentFree(params?: any, name?: string): Promise<boolean | null>;
369
+ sessionAnimationCaption(params?: any, name?: string): Promise<boolean | null>;
370
+ sessionAnimationCaptionPayload(params?: any, name?: string): Promise<boolean | null>;
371
+ sessionAnimationCaptionCommand(params?: any, name?: string): Promise<boolean | null>;
372
+ sessionAnimationCaptionCommandPayload(params?: any, name?: string): Promise<boolean | null>;
373
+ sessionAnimationFree(params?: any, name?: string): Promise<boolean | null>;
374
+ sessionVoiceCaption(params?: any, name?: string): Promise<boolean | null>;
375
+ sessionVoiceCaptionPayload(params?: any, name?: string): Promise<boolean | null>;
376
+ sessionVoiceCaptionCommand(params?: any, name?: string): Promise<boolean | null>;
377
+ sessionVoiceCaptionCommandPayload(params?: any, name?: string): Promise<boolean | null>;
378
+ sessionVoiceFree(params?: any, name?: string): Promise<boolean | null>;
379
+ sessionVideoNoteCaption(params?: any, name?: string): Promise<boolean | null>;
380
+ sessionVideoNoteCaptionPayload(params?: any, name?: string): Promise<boolean | null>;
381
+ sessionVideoNoteCaptionCommand(params?: any, name?: string): Promise<boolean | null>;
382
+ sessionVideoNoteCaptionCommandPayload(params?: any, name?: string): Promise<boolean | null>;
383
+ sessionVideoNoteFree(params?: any, name?: string): Promise<boolean | null>;
384
+ sessionStickerFree(params?: any, name?: string): Promise<boolean | null>;
385
+ sessionLocationFree(params?: any, name?: string): Promise<boolean | null>;
386
+ sessionContactFree(params?: any, name?: string): Promise<boolean | null>;
387
+ sessionToCallback(paramsAdd?: any, name?: string): Promise<boolean | null>;
388
+ sessionToCallbackPayload(paramsAdd?: any, name?: string): Promise<boolean | null>;
389
+ sessionToText(paramsAdd?: any, name?: string): Promise<boolean | null>;
390
+ sessionToTextPayload(paramsAdd?: any, name?: string): Promise<boolean | null>;
391
+ sessionToTextCommand(paramsAdd?: any, name?: string): Promise<boolean | null>;
392
+ sessionToTextCommandPayload(paramsAdd?: any, name?: string): Promise<boolean | null>;
393
+ sessionToTextFree(paramsAdd?: any, name?: string): Promise<boolean | null>;
394
+ sessionToPhotoCaption(paramsAdd?: any, name?: string): Promise<boolean | null>;
395
+ sessionToPhotoCaptionPayload(paramsAdd?: any, name?: string): Promise<boolean | null>;
396
+ sessionToPhotoCaptionCommand(paramsAdd?: any, name?: string): Promise<boolean | null>;
397
+ sessionToPhotoCaptionCommandPayload(paramsAdd?: any, name?: string): Promise<boolean | null>;
398
+ sessionToPhotoFree(paramsAdd?: any, name?: string): Promise<boolean | null>;
399
+ sessionToVideoCaption(paramsAdd?: any, name?: string): Promise<boolean | null>;
400
+ sessionToVideoCaptionPayload(paramsAdd?: any, name?: string): Promise<boolean | null>;
401
+ sessionToVideoCaptionCommand(paramsAdd?: any, name?: string): Promise<boolean | null>;
402
+ sessionToVideoCaptionCommandPayload(paramsAdd?: any, name?: string): Promise<boolean | null>;
403
+ sessionToVideoFree(paramsAdd?: any, name?: string): Promise<boolean | null>;
404
+ sessionToAudioCaption(paramsAdd?: any, name?: string): Promise<boolean | null>;
405
+ sessionToAudioCaptionPayload(paramsAdd?: any, name?: string): Promise<boolean | null>;
406
+ sessionToAudioCaptionCommand(paramsAdd?: any, name?: string): Promise<boolean | null>;
407
+ sessionToAudioCaptionCommandPayload(paramsAdd?: any, name?: string): Promise<boolean | null>;
408
+ sessionToAudioFree(paramsAdd?: any, name?: string): Promise<boolean | null>;
409
+ sessionToDocumentCaption(paramsAdd?: any, name?: string): Promise<boolean | null>;
410
+ sessionToDocumentCaptionPayload(paramsAdd?: any, name?: string): Promise<boolean | null>;
411
+ sessionToDocumentCaptionCommand(paramsAdd?: any, name?: string): Promise<boolean | null>;
412
+ sessionToDocumentCaptionCommandPayload(paramsAdd?: any, name?: string): Promise<boolean | null>;
413
+ sessionToDocumentFree(paramsAdd?: any, name?: string): Promise<boolean | null>;
414
+ sessionToAnimationCaption(paramsAdd?: any, name?: string): Promise<boolean | null>;
415
+ sessionToAnimationCaptionPayload(paramsAdd?: any, name?: string): Promise<boolean | null>;
416
+ sessionToAnimationCaptionCommand(paramsAdd?: any, name?: string): Promise<boolean | null>;
417
+ sessionToAnimationCaptionCommandPayload(paramsAdd?: any, name?: string): Promise<boolean | null>;
418
+ sessionToAnimationFree(paramsAdd?: any, name?: string): Promise<boolean | null>;
419
+ sessionToVoiceCaption(paramsAdd?: any, name?: string): Promise<boolean | null>;
420
+ sessionToVoiceCaptionPayload(paramsAdd?: any, name?: string): Promise<boolean | null>;
421
+ sessionToVoiceCaptionCommand(paramsAdd?: any, name?: string): Promise<boolean | null>;
422
+ sessionToVoiceCaptionCommandPayload(paramsAdd?: any, name?: string): Promise<boolean | null>;
423
+ sessionToVoiceFree(paramsAdd?: any, name?: string): Promise<boolean | null>;
424
+ sessionToVideoNoteCaption(paramsAdd?: any, name?: string): Promise<boolean | null>;
425
+ sessionToVideoNoteCaptionPayload(paramsAdd?: any, name?: string): Promise<boolean | null>;
426
+ sessionToVideoNoteCaptionCommand(paramsAdd?: any, name?: string): Promise<boolean | null>;
427
+ sessionToVideoNoteCaptionCommandPayload(paramsAdd?: any, name?: string): Promise<boolean | null>;
428
+ sessionToVideoNoteFree(paramsAdd?: any, name?: string): Promise<boolean | null>;
429
+ sessionToStickerFree(paramsAdd?: any, name?: string): Promise<boolean | null>;
430
+ sessionToLocationFree(paramsAdd?: any, name?: string): Promise<boolean | null>;
431
+ sessionToContactFree(paramsAdd?: any, name?: string): Promise<boolean | null>;
432
+ buildIntent(str?: string, fbCallbackData?: boolean): string;
433
+ buildSessionMethod(prefix: string, name: string | undefined): string;
434
+ buildSessionMethodCallback(name?: string): string;
435
+ buildSessionMethodCallbackPayload(name?: string): string;
436
+ buildSessionMethodText(name?: string): string;
437
+ buildSessionMethodTextPayload(name?: string): string;
438
+ buildSessionMethodTextCommand(name?: string): string;
439
+ buildSessionMethodTextCommandPayload(name?: string): string;
440
+ buildSessionMethodTextFree(name?: string): string;
441
+ buildSessionMethodPhotoCaption(name?: string): string;
442
+ buildSessionMethodPhotoCaptionPayload(name?: string): string;
443
+ buildSessionMethodPhotoCaptionCommand(name?: string): string;
444
+ buildSessionMethodPhotoCaptionCommandPayload(name?: string): string;
445
+ buildSessionMethodPhotoFree(name?: string): string;
446
+ buildSessionMethodVideoCaption(name?: string): string;
447
+ buildSessionMethodVideoCaptionPayload(name?: string): string;
448
+ buildSessionMethodVideoCaptionCommand(name?: string): string;
449
+ buildSessionMethodVideoCaptionCommandPayload(name?: string): string;
450
+ buildSessionMethodVideoFree(name?: string): string;
451
+ buildSessionMethodAudioCaption(name?: string): string;
452
+ buildSessionMethodAudioCaptionPayload(name?: string): string;
453
+ buildSessionMethodAudioCaptionCommand(name?: string): string;
454
+ buildSessionMethodAudioCaptionCommandPayload(name?: string): string;
455
+ buildSessionMethodAudioFree(name?: string): string;
456
+ buildSessionMethodDocumentCaption(name?: string): string;
457
+ buildSessionMethodDocumentCaptionPayload(name?: string): string;
458
+ buildSessionMethodDocumentCaptionCommand(name?: string): string;
459
+ buildSessionMethodDocumentCaptionCommandPayload(name?: string): string;
460
+ buildSessionMethodDocumentFree(name?: string): string;
461
+ buildSessionMethodAnimationCaption(name?: string): string;
462
+ buildSessionMethodAnimationCaptionPayload(name?: string): string;
463
+ buildSessionMethodAnimationCaptionCommand(name?: string): string;
464
+ buildSessionMethodAnimationCaptionCommandPayload(name?: string): string;
465
+ buildSessionMethodAnimationFree(name?: string): string;
466
+ buildSessionMethodVoiceCaption(name?: string): string;
467
+ buildSessionMethodVoiceCaptionPayload(name?: string): string;
468
+ buildSessionMethodVoiceCaptionCommand(name?: string): string;
469
+ buildSessionMethodVoiceCaptionCommandPayload(name?: string): string;
470
+ buildSessionMethodVoiceFree(name?: string): string;
471
+ buildSessionMethodVideoNoteCaption(name?: string): string;
472
+ buildSessionMethodVideoNoteCaptionPayload(name?: string): string;
473
+ buildSessionMethodVideoNoteCaptionCommand(name?: string): string;
474
+ buildSessionMethodVideoNoteCaptionCommandPayload(name?: string): string;
475
+ buildSessionMethodVideoNoteFree(name?: string): string;
476
+ buildSessionMethodStickerFree(name?: string): string;
477
+ buildSessionMethodLocationFree(name?: string): string;
478
+ buildSessionMethodContactFree(name?: string): string;
479
+ }
480
+
481
+ declare abstract class BaseGuard extends BasePage {
482
+ pageData: {
483
+ name: string;
484
+ callbackData: (...args: any) => string | any;
485
+ };
486
+ constructor(page: {
487
+ ctx: Ctx;
488
+ data?: any;
489
+ });
490
+ }
491
+
492
+ declare const Page = class extends BasePage {}
493
+ type IPageBase = typeof Page
494
+
495
+ declare class Gramstax {
496
+ templateManager: TemplateManager;
497
+ cacheKeyboard: Map<any, any>;
498
+ cacheSession: CacheExternal;
499
+ pages: {
500
+ all: Record<string, IPageBase>;
501
+ dynamic: string[];
502
+ dynamicSpesific: {
503
+ text: {
504
+ name: string;
505
+ func: string;
506
+ }[];
507
+ photo: {
508
+ name: string;
509
+ func: string;
510
+ }[];
511
+ video: {
512
+ name: string;
513
+ func: string;
514
+ }[];
515
+ audio: {
516
+ name: string;
517
+ func: string;
518
+ }[];
519
+ document: {
520
+ name: string;
521
+ func: string;
522
+ }[];
523
+ animation: {
524
+ name: string;
525
+ func: string;
526
+ }[];
527
+ voice: {
528
+ name: string;
529
+ func: string;
530
+ }[];
531
+ videoNote: {
532
+ name: string;
533
+ func: string;
534
+ }[];
535
+ sticker: {
536
+ name: string;
537
+ func: string;
538
+ }[];
539
+ location: {
540
+ name: string;
541
+ func: string;
542
+ }[];
543
+ contact: {
544
+ name: string;
545
+ func: string;
546
+ }[];
547
+ };
548
+ static: {
549
+ text: Record<string, {
550
+ name: string;
551
+ func: string;
552
+ }>;
553
+ callback: Record<string, {
554
+ name: string;
555
+ func: string;
556
+ }>;
557
+ textCommand: Record<string, {
558
+ name: string;
559
+ func: string;
560
+ }>;
561
+ photoCaption: Record<string, {
562
+ name: string;
563
+ func: string;
564
+ }>;
565
+ photoCaptionCommand: Record<string, {
566
+ name: string;
567
+ func: string;
568
+ }>;
569
+ videoCaption: Record<string, {
570
+ name: string;
571
+ func: string;
572
+ }>;
573
+ videoCaptionCommand: Record<string, {
574
+ name: string;
575
+ func: string;
576
+ }>;
577
+ audioCaption: Record<string, {
578
+ name: string;
579
+ func: string;
580
+ }>;
581
+ audioCaptionCommand: Record<string, {
582
+ name: string;
583
+ func: string;
584
+ }>;
585
+ documentCaption: Record<string, {
586
+ name: string;
587
+ func: string;
588
+ }>;
589
+ documentCaptionCommand: Record<string, {
590
+ name: string;
591
+ func: string;
592
+ }>;
593
+ animationCaption: Record<string, {
594
+ name: string;
595
+ func: string;
596
+ }>;
597
+ animationCaptionCommand: Record<string, {
598
+ name: string;
599
+ func: string;
600
+ }>;
601
+ voiceCaption: Record<string, {
602
+ name: string;
603
+ func: string;
604
+ }>;
605
+ voiceCaptionCommand: Record<string, {
606
+ name: string;
607
+ func: string;
608
+ }>;
609
+ videoNoteCaption: Record<string, {
610
+ name: string;
611
+ func: string;
612
+ }>;
613
+ videoNoteCaptionCommand: Record<string, {
614
+ name: string;
615
+ func: string;
616
+ }>;
617
+ };
618
+ staticIntent: {
619
+ callbackPayload: Record<string, {
620
+ name: string;
621
+ func: string;
622
+ }>;
623
+ textPayload: Record<string, {
624
+ name: string;
625
+ func: string;
626
+ }>;
627
+ textCommandPayload: Record<string, {
628
+ name: string;
629
+ func: string;
630
+ }>;
631
+ photoCaptionPayload: Record<string, {
632
+ name: string;
633
+ func: string;
634
+ }>;
635
+ photoCaptionCommandPayload: Record<string, {
636
+ name: string;
637
+ func: string;
638
+ }>;
639
+ videoCaptionPayload: Record<string, {
640
+ name: string;
641
+ func: string;
642
+ }>;
643
+ videoCaptionCommandPayload: Record<string, {
644
+ name: string;
645
+ func: string;
646
+ }>;
647
+ audioCaptionPayload: Record<string, {
648
+ name: string;
649
+ func: string;
650
+ }>;
651
+ audioCaptionCommandPayload: Record<string, {
652
+ name: string;
653
+ func: string;
654
+ }>;
655
+ documentCaptionPayload: Record<string, {
656
+ name: string;
657
+ func: string;
658
+ }>;
659
+ documentCaptionCommandPayload: Record<string, {
660
+ name: string;
661
+ func: string;
662
+ }>;
663
+ animationCaptionPayload: Record<string, {
664
+ name: string;
665
+ func: string;
666
+ }>;
667
+ animationCaptionCommandPayload: Record<string, {
668
+ name: string;
669
+ func: string;
670
+ }>;
671
+ voiceCaptionPayload: Record<string, {
672
+ name: string;
673
+ func: string;
674
+ }>;
675
+ voiceCaptionCommandPayload: Record<string, {
676
+ name: string;
677
+ func: string;
678
+ }>;
679
+ videoNoteCaptionPayload: Record<string, {
680
+ name: string;
681
+ func: string;
682
+ }>;
683
+ videoNoteCaptionCommandPayload: Record<string, {
684
+ name: string;
685
+ func: string;
686
+ }>;
687
+ };
688
+ staticSession: {
689
+ text: Record<string, {
690
+ name: string;
691
+ func: string;
692
+ }>;
693
+ callback: Record<string, {
694
+ name: string;
695
+ func: string;
696
+ }>;
697
+ textCommand: Record<string, {
698
+ name: string;
699
+ func: string;
700
+ }>;
701
+ photoCaption: Record<string, {
702
+ name: string;
703
+ func: string;
704
+ }>;
705
+ photoCaptionCommand: Record<string, {
706
+ name: string;
707
+ func: string;
708
+ }>;
709
+ videoCaption: Record<string, {
710
+ name: string;
711
+ func: string;
712
+ }>;
713
+ videoCaptionCommand: Record<string, {
714
+ name: string;
715
+ func: string;
716
+ }>;
717
+ audioCaption: Record<string, {
718
+ name: string;
719
+ func: string;
720
+ }>;
721
+ audioCaptionCommand: Record<string, {
722
+ name: string;
723
+ func: string;
724
+ }>;
725
+ documentCaption: Record<string, {
726
+ name: string;
727
+ func: string;
728
+ }>;
729
+ documentCaptionCommand: Record<string, {
730
+ name: string;
731
+ func: string;
732
+ }>;
733
+ animationCaption: Record<string, {
734
+ name: string;
735
+ func: string;
736
+ }>;
737
+ animationCaptionCommand: Record<string, {
738
+ name: string;
739
+ func: string;
740
+ }>;
741
+ voiceCaption: Record<string, {
742
+ name: string;
743
+ func: string;
744
+ }>;
745
+ voiceCaptionCommand: Record<string, {
746
+ name: string;
747
+ func: string;
748
+ }>;
749
+ videoNoteCaption: Record<string, {
750
+ name: string;
751
+ func: string;
752
+ }>;
753
+ videoNoteCaptionCommand: Record<string, {
754
+ name: string;
755
+ func: string;
756
+ }>;
757
+ callbackPayload: Record<string, {
758
+ name: string;
759
+ func: string;
760
+ }>;
761
+ textPayload: Record<string, {
762
+ name: string;
763
+ func: string;
764
+ }>;
765
+ textCommandPayload: Record<string, {
766
+ name: string;
767
+ func: string;
768
+ }>;
769
+ photoCaptionPayload: Record<string, {
770
+ name: string;
771
+ func: string;
772
+ }>;
773
+ photoCaptionCommandPayload: Record<string, {
774
+ name: string;
775
+ func: string;
776
+ }>;
777
+ videoCaptionPayload: Record<string, {
778
+ name: string;
779
+ func: string;
780
+ }>;
781
+ videoCaptionCommandPayload: Record<string, {
782
+ name: string;
783
+ func: string;
784
+ }>;
785
+ audioCaptionPayload: Record<string, {
786
+ name: string;
787
+ func: string;
788
+ }>;
789
+ audioCaptionCommandPayload: Record<string, {
790
+ name: string;
791
+ func: string;
792
+ }>;
793
+ documentCaptionPayload: Record<string, {
794
+ name: string;
795
+ func: string;
796
+ }>;
797
+ documentCaptionCommandPayload: Record<string, {
798
+ name: string;
799
+ func: string;
800
+ }>;
801
+ animationCaptionPayload: Record<string, {
802
+ name: string;
803
+ func: string;
804
+ }>;
805
+ animationCaptionCommandPayload: Record<string, {
806
+ name: string;
807
+ func: string;
808
+ }>;
809
+ voiceCaptionPayload: Record<string, {
810
+ name: string;
811
+ func: string;
812
+ }>;
813
+ voiceCaptionCommandPayload: Record<string, {
814
+ name: string;
815
+ func: string;
816
+ }>;
817
+ videoNoteCaptionPayload: Record<string, {
818
+ name: string;
819
+ func: string;
820
+ }>;
821
+ videoNoteCaptionCommandPayload: Record<string, {
822
+ name: string;
823
+ func: string;
824
+ }>;
825
+ textFree: Record<string, {
826
+ name: string;
827
+ func: string;
828
+ }>;
829
+ photoFree: Record<string, {
830
+ name: string;
831
+ func: string;
832
+ }>;
833
+ videoFree: Record<string, {
834
+ name: string;
835
+ func: string;
836
+ }>;
837
+ audioFree: Record<string, {
838
+ name: string;
839
+ func: string;
840
+ }>;
841
+ documentFree: Record<string, {
842
+ name: string;
843
+ func: string;
844
+ }>;
845
+ animationFree: Record<string, {
846
+ name: string;
847
+ func: string;
848
+ }>;
849
+ voiceFree: Record<string, {
850
+ name: string;
851
+ func: string;
852
+ }>;
853
+ videoNoteFree: Record<string, {
854
+ name: string;
855
+ func: string;
856
+ }>;
857
+ stickerFree: Record<string, {
858
+ name: string;
859
+ func: string;
860
+ }>;
861
+ locationFree: Record<string, {
862
+ name: string;
863
+ func: string;
864
+ }>;
865
+ contactFree: Record<string, {
866
+ name: string;
867
+ func: string;
868
+ }>;
869
+ };
870
+ listFuncStatic: readonly ["callback", "text", "textCommand", "photoCaption", "photoCaptionCommand", "videoCaption", "videoCaptionCommand", "audioCaption", "audioCaptionCommand", "documentCaption", "documentCaptionCommand", "animationCaption", "animationCaptionCommand", "voiceCaption", "voiceCaptionCommand", "videoNoteCaption", "videoNoteCaptionCommand"];
871
+ listFuncStaticIntent: readonly ["callbackPayload", "textPayload", "textCommandPayload", "photoCaptionPayload", "photoCaptionCommandPayload", "videoCaptionPayload", "videoCaptionCommandPayload", "audioCaptionPayload", "audioCaptionCommandPayload", "documentCaptionPayload", "documentCaptionCommandPayload", "animationCaptionPayload", "animationCaptionCommandPayload", "voiceCaptionPayload", "voiceCaptionCommandPayload", "videoNoteCaptionPayload", "videoNoteCaptionCommandPayload"];
872
+ listFuncStaticSession: readonly ["callback", "text", "textCommand", "photoCaption", "photoCaptionCommand", "videoCaption", "videoCaptionCommand", "audioCaption", "audioCaptionCommand", "documentCaption", "documentCaptionCommand", "animationCaption", "animationCaptionCommand", "voiceCaption", "voiceCaptionCommand", "videoNoteCaption", "videoNoteCaptionCommand", "callbackPayload", "textPayload", "textCommandPayload", "photoCaptionPayload", "photoCaptionCommandPayload", "videoCaptionPayload", "videoCaptionCommandPayload", "audioCaptionPayload", "audioCaptionCommandPayload", "documentCaptionPayload", "documentCaptionCommandPayload", "animationCaptionPayload", "animationCaptionCommandPayload", "voiceCaptionPayload", "voiceCaptionCommandPayload", "videoNoteCaptionPayload", "videoNoteCaptionCommandPayload", "textFree", "photoFree", "videoFree", "audioFree", "documentFree", "animationFree", "voiceFree", "videoNoteFree", "stickerFree", "locationFree", "contactFree"];
873
+ lenListFuncStatic: 17;
874
+ lenListFuncStaticIntent: 17;
875
+ lenListFuncStaticSession: 45;
876
+ };
877
+ log: LoggingPretty$1;
878
+ bot: Bot;
879
+ constructor(params: {
880
+ token: string;
881
+ deploy: string;
882
+ log?: LoggingPretty$1;
883
+ cacheSession?: CacheExternal;
884
+ cacheKeyboard?: Map<any, any>;
885
+ templateManager?: TemplateManager;
886
+ });
887
+ onCatch(error: BotError<Context>): void;
888
+ onStart(botInfo: UserFromGetMe, method: `polling` | `webhook`, data: string | null): void;
889
+ initCtx(ct: Context): Ctx;
890
+ runPolling(): Promise<void>;
891
+ runWebhook(baseUrl: string): Promise<void>;
892
+ pageCompile(Page: IPageBase, redacted?: boolean): void;
893
+ pageBuildData(Page: IPageBase, filePath: string): void;
894
+ pageSorts(Page: IPageBase, pages: typeof this.pages): void;
895
+ pageLoads(): {
896
+ all: Record<string, IPageBase>;
897
+ dynamic: string[];
898
+ dynamicSpesific: {
899
+ text: {
900
+ name: string;
901
+ func: string;
902
+ }[];
903
+ photo: {
904
+ name: string;
905
+ func: string;
906
+ }[];
907
+ video: {
908
+ name: string;
909
+ func: string;
910
+ }[];
911
+ audio: {
912
+ name: string;
913
+ func: string;
914
+ }[];
915
+ document: {
916
+ name: string;
917
+ func: string;
918
+ }[];
919
+ animation: {
920
+ name: string;
921
+ func: string;
922
+ }[];
923
+ voice: {
924
+ name: string;
925
+ func: string;
926
+ }[];
927
+ videoNote: {
928
+ name: string;
929
+ func: string;
930
+ }[];
931
+ sticker: {
932
+ name: string;
933
+ func: string;
934
+ }[];
935
+ location: {
936
+ name: string;
937
+ func: string;
938
+ }[];
939
+ contact: {
940
+ name: string;
941
+ func: string;
942
+ }[];
943
+ };
944
+ static: {
945
+ text: Record<string, {
946
+ name: string;
947
+ func: string;
948
+ }>;
949
+ callback: Record<string, {
950
+ name: string;
951
+ func: string;
952
+ }>;
953
+ textCommand: Record<string, {
954
+ name: string;
955
+ func: string;
956
+ }>;
957
+ photoCaption: Record<string, {
958
+ name: string;
959
+ func: string;
960
+ }>;
961
+ photoCaptionCommand: Record<string, {
962
+ name: string;
963
+ func: string;
964
+ }>;
965
+ videoCaption: Record<string, {
966
+ name: string;
967
+ func: string;
968
+ }>;
969
+ videoCaptionCommand: Record<string, {
970
+ name: string;
971
+ func: string;
972
+ }>;
973
+ audioCaption: Record<string, {
974
+ name: string;
975
+ func: string;
976
+ }>;
977
+ audioCaptionCommand: Record<string, {
978
+ name: string;
979
+ func: string;
980
+ }>;
981
+ documentCaption: Record<string, {
982
+ name: string;
983
+ func: string;
984
+ }>;
985
+ documentCaptionCommand: Record<string, {
986
+ name: string;
987
+ func: string;
988
+ }>;
989
+ animationCaption: Record<string, {
990
+ name: string;
991
+ func: string;
992
+ }>;
993
+ animationCaptionCommand: Record<string, {
994
+ name: string;
995
+ func: string;
996
+ }>;
997
+ voiceCaption: Record<string, {
998
+ name: string;
999
+ func: string;
1000
+ }>;
1001
+ voiceCaptionCommand: Record<string, {
1002
+ name: string;
1003
+ func: string;
1004
+ }>;
1005
+ videoNoteCaption: Record<string, {
1006
+ name: string;
1007
+ func: string;
1008
+ }>;
1009
+ videoNoteCaptionCommand: Record<string, {
1010
+ name: string;
1011
+ func: string;
1012
+ }>;
1013
+ };
1014
+ staticIntent: {
1015
+ callbackPayload: Record<string, {
1016
+ name: string;
1017
+ func: string;
1018
+ }>;
1019
+ textPayload: Record<string, {
1020
+ name: string;
1021
+ func: string;
1022
+ }>;
1023
+ textCommandPayload: Record<string, {
1024
+ name: string;
1025
+ func: string;
1026
+ }>;
1027
+ photoCaptionPayload: Record<string, {
1028
+ name: string;
1029
+ func: string;
1030
+ }>;
1031
+ photoCaptionCommandPayload: Record<string, {
1032
+ name: string;
1033
+ func: string;
1034
+ }>;
1035
+ videoCaptionPayload: Record<string, {
1036
+ name: string;
1037
+ func: string;
1038
+ }>;
1039
+ videoCaptionCommandPayload: Record<string, {
1040
+ name: string;
1041
+ func: string;
1042
+ }>;
1043
+ audioCaptionPayload: Record<string, {
1044
+ name: string;
1045
+ func: string;
1046
+ }>;
1047
+ audioCaptionCommandPayload: Record<string, {
1048
+ name: string;
1049
+ func: string;
1050
+ }>;
1051
+ documentCaptionPayload: Record<string, {
1052
+ name: string;
1053
+ func: string;
1054
+ }>;
1055
+ documentCaptionCommandPayload: Record<string, {
1056
+ name: string;
1057
+ func: string;
1058
+ }>;
1059
+ animationCaptionPayload: Record<string, {
1060
+ name: string;
1061
+ func: string;
1062
+ }>;
1063
+ animationCaptionCommandPayload: Record<string, {
1064
+ name: string;
1065
+ func: string;
1066
+ }>;
1067
+ voiceCaptionPayload: Record<string, {
1068
+ name: string;
1069
+ func: string;
1070
+ }>;
1071
+ voiceCaptionCommandPayload: Record<string, {
1072
+ name: string;
1073
+ func: string;
1074
+ }>;
1075
+ videoNoteCaptionPayload: Record<string, {
1076
+ name: string;
1077
+ func: string;
1078
+ }>;
1079
+ videoNoteCaptionCommandPayload: Record<string, {
1080
+ name: string;
1081
+ func: string;
1082
+ }>;
1083
+ };
1084
+ staticSession: {
1085
+ text: Record<string, {
1086
+ name: string;
1087
+ func: string;
1088
+ }>;
1089
+ callback: Record<string, {
1090
+ name: string;
1091
+ func: string;
1092
+ }>;
1093
+ textCommand: Record<string, {
1094
+ name: string;
1095
+ func: string;
1096
+ }>;
1097
+ photoCaption: Record<string, {
1098
+ name: string;
1099
+ func: string;
1100
+ }>;
1101
+ photoCaptionCommand: Record<string, {
1102
+ name: string;
1103
+ func: string;
1104
+ }>;
1105
+ videoCaption: Record<string, {
1106
+ name: string;
1107
+ func: string;
1108
+ }>;
1109
+ videoCaptionCommand: Record<string, {
1110
+ name: string;
1111
+ func: string;
1112
+ }>;
1113
+ audioCaption: Record<string, {
1114
+ name: string;
1115
+ func: string;
1116
+ }>;
1117
+ audioCaptionCommand: Record<string, {
1118
+ name: string;
1119
+ func: string;
1120
+ }>;
1121
+ documentCaption: Record<string, {
1122
+ name: string;
1123
+ func: string;
1124
+ }>;
1125
+ documentCaptionCommand: Record<string, {
1126
+ name: string;
1127
+ func: string;
1128
+ }>;
1129
+ animationCaption: Record<string, {
1130
+ name: string;
1131
+ func: string;
1132
+ }>;
1133
+ animationCaptionCommand: Record<string, {
1134
+ name: string;
1135
+ func: string;
1136
+ }>;
1137
+ voiceCaption: Record<string, {
1138
+ name: string;
1139
+ func: string;
1140
+ }>;
1141
+ voiceCaptionCommand: Record<string, {
1142
+ name: string;
1143
+ func: string;
1144
+ }>;
1145
+ videoNoteCaption: Record<string, {
1146
+ name: string;
1147
+ func: string;
1148
+ }>;
1149
+ videoNoteCaptionCommand: Record<string, {
1150
+ name: string;
1151
+ func: string;
1152
+ }>;
1153
+ callbackPayload: Record<string, {
1154
+ name: string;
1155
+ func: string;
1156
+ }>;
1157
+ textPayload: Record<string, {
1158
+ name: string;
1159
+ func: string;
1160
+ }>;
1161
+ textCommandPayload: Record<string, {
1162
+ name: string;
1163
+ func: string;
1164
+ }>;
1165
+ photoCaptionPayload: Record<string, {
1166
+ name: string;
1167
+ func: string;
1168
+ }>;
1169
+ photoCaptionCommandPayload: Record<string, {
1170
+ name: string;
1171
+ func: string;
1172
+ }>;
1173
+ videoCaptionPayload: Record<string, {
1174
+ name: string;
1175
+ func: string;
1176
+ }>;
1177
+ videoCaptionCommandPayload: Record<string, {
1178
+ name: string;
1179
+ func: string;
1180
+ }>;
1181
+ audioCaptionPayload: Record<string, {
1182
+ name: string;
1183
+ func: string;
1184
+ }>;
1185
+ audioCaptionCommandPayload: Record<string, {
1186
+ name: string;
1187
+ func: string;
1188
+ }>;
1189
+ documentCaptionPayload: Record<string, {
1190
+ name: string;
1191
+ func: string;
1192
+ }>;
1193
+ documentCaptionCommandPayload: Record<string, {
1194
+ name: string;
1195
+ func: string;
1196
+ }>;
1197
+ animationCaptionPayload: Record<string, {
1198
+ name: string;
1199
+ func: string;
1200
+ }>;
1201
+ animationCaptionCommandPayload: Record<string, {
1202
+ name: string;
1203
+ func: string;
1204
+ }>;
1205
+ voiceCaptionPayload: Record<string, {
1206
+ name: string;
1207
+ func: string;
1208
+ }>;
1209
+ voiceCaptionCommandPayload: Record<string, {
1210
+ name: string;
1211
+ func: string;
1212
+ }>;
1213
+ videoNoteCaptionPayload: Record<string, {
1214
+ name: string;
1215
+ func: string;
1216
+ }>;
1217
+ videoNoteCaptionCommandPayload: Record<string, {
1218
+ name: string;
1219
+ func: string;
1220
+ }>;
1221
+ textFree: Record<string, {
1222
+ name: string;
1223
+ func: string;
1224
+ }>;
1225
+ photoFree: Record<string, {
1226
+ name: string;
1227
+ func: string;
1228
+ }>;
1229
+ videoFree: Record<string, {
1230
+ name: string;
1231
+ func: string;
1232
+ }>;
1233
+ audioFree: Record<string, {
1234
+ name: string;
1235
+ func: string;
1236
+ }>;
1237
+ documentFree: Record<string, {
1238
+ name: string;
1239
+ func: string;
1240
+ }>;
1241
+ animationFree: Record<string, {
1242
+ name: string;
1243
+ func: string;
1244
+ }>;
1245
+ voiceFree: Record<string, {
1246
+ name: string;
1247
+ func: string;
1248
+ }>;
1249
+ videoNoteFree: Record<string, {
1250
+ name: string;
1251
+ func: string;
1252
+ }>;
1253
+ stickerFree: Record<string, {
1254
+ name: string;
1255
+ func: string;
1256
+ }>;
1257
+ locationFree: Record<string, {
1258
+ name: string;
1259
+ func: string;
1260
+ }>;
1261
+ contactFree: Record<string, {
1262
+ name: string;
1263
+ func: string;
1264
+ }>;
1265
+ };
1266
+ listFuncStatic: readonly ["callback", "text", "textCommand", "photoCaption", "photoCaptionCommand", "videoCaption", "videoCaptionCommand", "audioCaption", "audioCaptionCommand", "documentCaption", "documentCaptionCommand", "animationCaption", "animationCaptionCommand", "voiceCaption", "voiceCaptionCommand", "videoNoteCaption", "videoNoteCaptionCommand"];
1267
+ listFuncStaticIntent: readonly ["callbackPayload", "textPayload", "textCommandPayload", "photoCaptionPayload", "photoCaptionCommandPayload", "videoCaptionPayload", "videoCaptionCommandPayload", "audioCaptionPayload", "audioCaptionCommandPayload", "documentCaptionPayload", "documentCaptionCommandPayload", "animationCaptionPayload", "animationCaptionCommandPayload", "voiceCaptionPayload", "voiceCaptionCommandPayload", "videoNoteCaptionPayload", "videoNoteCaptionCommandPayload"];
1268
+ listFuncStaticSession: readonly ["callback", "text", "textCommand", "photoCaption", "photoCaptionCommand", "videoCaption", "videoCaptionCommand", "audioCaption", "audioCaptionCommand", "documentCaption", "documentCaptionCommand", "animationCaption", "animationCaptionCommand", "voiceCaption", "voiceCaptionCommand", "videoNoteCaption", "videoNoteCaptionCommand", "callbackPayload", "textPayload", "textCommandPayload", "photoCaptionPayload", "photoCaptionCommandPayload", "videoCaptionPayload", "videoCaptionCommandPayload", "audioCaptionPayload", "audioCaptionCommandPayload", "documentCaptionPayload", "documentCaptionCommandPayload", "animationCaptionPayload", "animationCaptionCommandPayload", "voiceCaptionPayload", "voiceCaptionCommandPayload", "videoNoteCaptionPayload", "videoNoteCaptionCommandPayload", "textFree", "photoFree", "videoFree", "audioFree", "documentFree", "animationFree", "voiceFree", "videoNoteFree", "stickerFree", "locationFree", "contactFree"];
1269
+ lenListFuncStatic: 17;
1270
+ lenListFuncStaticIntent: 17;
1271
+ lenListFuncStaticSession: 45;
1272
+ };
1273
+ pageRoutes(ctx: Ctx, fromListener: `callback` | keyof typeof this$1.pages.dynamicSpesific): Promise<any | null>;
1274
+ hookBeforeRoute(ctx: Ctx, listenerName: string): Promise<boolean>;
1275
+ hookErrorPage(ctx: Ctx, listenerName: string, error: any, isEdit: boolean): Promise<void>;
1276
+ hookErrorInputNotFoundPage(ctx: Ctx): Promise<void>;
1277
+ onMessage(ct: Context, listenerName: string): Promise<void>;
1278
+ onCallbackQueryData(ct: Context): Promise<void>;
1279
+ onMessageText(ct: Context): Promise<void>;
1280
+ onMessagePhoto(ct: Context): Promise<void>;
1281
+ onMessageVideo(ct: Context): Promise<void>;
1282
+ onMessageAudio(ct: Context): Promise<void>;
1283
+ onMessageDocument(ct: Context): Promise<void>;
1284
+ onMessageAnimation(ct: Context): Promise<void>;
1285
+ onMessageVoice(ct: Context): Promise<void>;
1286
+ onMessageVideoNote(ct: Context): Promise<void>;
1287
+ onMessageSticker(ct: Context): Promise<void>;
1288
+ onMessageLocation(ct: Context): Promise<void>;
1289
+ onMessageContact(ct: Context): Promise<void>;
1290
+ }
1291
+
1292
+ export { BaseGeneral, BaseGuard, BasePage, CacheExternal, Ctx, Gramstax, TemplateEngine, TemplateManager };