@gramio/files
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -6,2 +6,4 @@ /** | ||
* | ||
* [Documentation](https://gramio.netlify.app/files/overview.html) | ||
* | ||
* @example | ||
@@ -8,0 +10,0 @@ * ```typescript |
@@ -7,2 +7,4 @@ "use strict"; | ||
* | ||
* [Documentation](https://gramio.netlify.app/files/overview.html) | ||
* | ||
* @example | ||
@@ -9,0 +11,0 @@ * ```typescript |
import type { TelegramInputMediaAnimation, TelegramInputMediaAudio, TelegramInputMediaDocument, TelegramInputMediaPhoto, TelegramInputMediaVideo } from "@gramio/types"; | ||
/** Class-helper with static methods that represents the content of a media message to be sent. */ | ||
/** | ||
* Class-helper with static methods that represents the content of a media message to be sent. | ||
* | ||
* [Documentation](https://gramio.netlify.app/files/media-input.html) | ||
*/ | ||
export declare class MediaInput { | ||
@@ -4,0 +8,0 @@ /** |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.MediaInput = void 0; | ||
/** Class-helper with static methods that represents the content of a media message to be sent. */ | ||
/** | ||
* Class-helper with static methods that represents the content of a media message to be sent. | ||
* | ||
* [Documentation](https://gramio.netlify.app/files/media-input.html) | ||
*/ | ||
class MediaInput { | ||
@@ -6,0 +10,0 @@ /** |
@@ -13,6 +13,10 @@ import type { APIMethodParams, APIMethods, TelegramInputFile } from "@gramio/types"; | ||
}; | ||
/** Guard for check is it File or Promise */ | ||
/** Guard for check is it {@link File} or {@link Promise} */ | ||
export declare function isFile(file?: TelegramInputFile | object | string): boolean; | ||
/** @codegenerated */ | ||
/** | ||
* A set of methods with the function of checking whether a {@link File} has been passed in the parameters | ||
* | ||
* @codegenerated | ||
* */ | ||
export declare const MEDIA_METHODS: MethodsWithMediaUpload; | ||
export {}; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.MEDIA_METHODS = exports.isFile = void 0; | ||
/** Guard for check is it File or Promise */ | ||
/** Guard for check is it {@link File} or {@link Promise} */ | ||
function isFile(file) { | ||
@@ -11,3 +11,7 @@ if (!file || typeof file !== "object") | ||
exports.isFile = isFile; | ||
/** @codegenerated */ | ||
/** | ||
* A set of methods with the function of checking whether a {@link File} has been passed in the parameters | ||
* | ||
* @codegenerated | ||
* */ | ||
exports.MEDIA_METHODS = { | ||
@@ -14,0 +18,0 @@ setWebhook: [(params) => isFile(params.certificate), null], |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import type { Readable } from "node:stream"; | ||
/** Class-helper with static methods for file uploading. */ | ||
/** | ||
* Class-helper with static methods for file uploading. | ||
* | ||
* [Documentation](https://gramio.netlify.app/files/media-upload.html) | ||
*/ | ||
export declare class MediaUpload { | ||
@@ -6,0 +10,0 @@ /** |
@@ -10,3 +10,7 @@ "use strict"; | ||
const utils_1 = require("./utils"); | ||
/** Class-helper with static methods for file uploading. */ | ||
/** | ||
* Class-helper with static methods for file uploading. | ||
* | ||
* [Documentation](https://gramio.netlify.app/files/media-upload.html) | ||
*/ | ||
class MediaUpload { | ||
@@ -13,0 +17,0 @@ /** |
{ | ||
"name": "@gramio/files", | ||
"main": "./dist/index.js", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"type": "commonjs", | ||
@@ -6,0 +6,0 @@ "description": "Set of utils for work with files and Telegram Bot API", |
18478
467