fix(client): made _normalizeInputFile and _normalizeInputMedia public
This commit is contained in:
parent
bf84556776
commit
3c79c56879
2 changed files with 35 additions and 3 deletions
|
@ -107,7 +107,12 @@ async function addSingleMethod(state, fileName) {
|
|||
)
|
||||
}
|
||||
|
||||
const isPrivate = name[0] === '_' && name !== '_handleUpdate'
|
||||
const isPrivate =
|
||||
name[0] === '_' &&
|
||||
name !== '_handleUpdate' &&
|
||||
name !== '_normalizeInputFile' &&
|
||||
name !== '_normalizeInputMedia'
|
||||
|
||||
const isExported = (stmt.modifiers || []).find(
|
||||
(mod) => mod.kind === 92 /* ExportKeyword */
|
||||
)
|
||||
|
|
|
@ -1472,6 +1472,33 @@ export interface TelegramClient extends BaseTelegramClient {
|
|||
* @param params File download parameters
|
||||
*/
|
||||
downloadAsStream(params: FileDownloadParameters): Readable
|
||||
/**
|
||||
* Normalize a {@link InputFileLike} to `InputFile`,
|
||||
* uploading it if needed.
|
||||
*
|
||||
*/
|
||||
_normalizeInputFile(
|
||||
input: InputFileLike,
|
||||
params: {
|
||||
progressCallback?: (uploaded: number, total: number) => void
|
||||
fileName?: string
|
||||
fileSize?: number
|
||||
fileMime?: string
|
||||
}
|
||||
): Promise<tl.TypeInputFile>
|
||||
/**
|
||||
* Normalize an {@link InputMediaLike} to `InputMedia`,
|
||||
* uploading the file if needed.
|
||||
*
|
||||
*/
|
||||
_normalizeInputMedia(
|
||||
media: InputMediaLike,
|
||||
params: {
|
||||
parseMode?: string | null
|
||||
progressCallback?: (uploaded: number, total: number) => void
|
||||
},
|
||||
uploadMedia?: boolean
|
||||
): Promise<tl.TypeInputMedia>
|
||||
/**
|
||||
* Upload a file to Telegram servers, without actually
|
||||
* sending a message anywhere. Useful when an `InputFile` is required.
|
||||
|
@ -3162,8 +3189,8 @@ export class TelegramClient extends BaseTelegramClient {
|
|||
downloadAsIterable = downloadAsIterable
|
||||
downloadAsStream = downloadAsStream
|
||||
protected _normalizeFileToDocument = _normalizeFileToDocument
|
||||
protected _normalizeInputFile = _normalizeInputFile
|
||||
protected _normalizeInputMedia = _normalizeInputMedia
|
||||
_normalizeInputFile = _normalizeInputFile
|
||||
_normalizeInputMedia = _normalizeInputMedia
|
||||
uploadFile = uploadFile
|
||||
createInviteLink = createInviteLink
|
||||
editInviteLink = editInviteLink
|
||||
|
|
Loading…
Reference in a new issue