1 | /// <reference types="node" />
|
2 | /// <reference types="node" />
|
3 | /// <reference types="node" />
|
4 | /// <reference types="node" />
|
5 | /// <reference types="node" />
|
6 | import { InputFile } from './core/types/typegram';
|
7 | /**
|
8 | * The local file specified by path will be uploaded to Telegram using multipart/form-data.
|
9 | *
|
10 | * 10 MB max size for photos, 50 MB for other files.
|
11 | */
|
12 | export declare const fromLocalFile: (path: string, filename?: string) => InputFile;
|
13 | /**
|
14 | * The buffer will be uploaded as file to Telegram using multipart/form-data.
|
15 | *
|
16 | * 10 MB max size for photos, 50 MB for other files.
|
17 | */
|
18 | export declare const fromBuffer: (buffer: Buffer, filename?: string) => InputFile;
|
19 | /**
|
20 | * Contents of the stream will be uploaded as file to Telegram using multipart/form-data.
|
21 | *
|
22 | * 10 MB max size for photos, 50 MB for other files.
|
23 | */
|
24 | export declare const fromReadableStream: (stream: NodeJS.ReadableStream, filename?: string) => InputFile;
|
25 | /**
|
26 | * Contents of the URL will be streamed to Telegram.
|
27 | *
|
28 | * 10 MB max size for photos, 50 MB for other files.
|
29 | */
|
30 | export declare const fromURLStream: (url: string | URL, filename?: string) => InputFile;
|
31 | /**
|
32 | * Provide Telegram with an HTTP URL for the file to be sent.
|
33 | * Telegram will download and send the file.
|
34 | *
|
35 | * * The target file must have the correct MIME type (e.g., audio/mpeg for `sendAudio`, etc.).
|
36 | * * `sendDocument` with URL will currently only work for GIF, PDF and ZIP files.
|
37 | * * To use `sendVoice`, the file must have the type audio/ogg and be no more than 1MB in size.
|
38 | * 1-20MB voice notes will be sent as files.
|
39 | *
|
40 | * 5 MB max size for photos and 20 MB max for other types of content.
|
41 | */
|
42 | export declare const fromURL: (url: string | URL) => string;
|
43 | /**
|
44 | * If the file is already stored somewhere on the Telegram servers, you don't need to reupload it:
|
45 | * each file object has a file_id field, simply pass this file_id as a parameter instead of uploading.
|
46 | *
|
47 | * It is not possible to change the file type when resending by file_id.
|
48 | *
|
49 | * It is not possible to resend thumbnails using file_id.
|
50 | * They have to be uploaded using one of the other Input methods.
|
51 | *
|
52 | * There are no limits for files sent this way.
|
53 | */
|
54 | export declare const fromFileId: (fileId: string) => string;
|
55 | //# sourceMappingURL=input.d.ts.map |
\ | No newline at end of file |