@grammyjs/types
Advanced tools
Comparing version 2.1.0 to 2.1.1
13
api.d.ts
@@ -5,2 +5,3 @@ export interface ApiError { | ||
description: string; | ||
parameters?: ResponseParameters; | ||
} | ||
@@ -13,2 +14,14 @@ | ||
/** The response contains an object, which always has a Boolean field 'ok' and may have an optional String field 'description' with a human-readable description of the result. If 'ok' equals true, the request was successful and the result of the query can be found in the 'result' field. In case of an unsuccessful request, 'ok' equals false and the error is explained in the 'description'. An Integer 'error_code' field is also returned, but its contents are subject to change in the future. Some errors may also have an optional field 'parameters' of the type ResponseParameters, which can help to automatically handle the error. | ||
All methods in the Bot API are case-insensitive. | ||
All queries must be made using UTF-8. */ | ||
export type ApiResponse<T> = ApiError | ApiSuccess<T>; | ||
/** Contains information about why a request was unsuccessful. */ | ||
export interface ResponseParameters { | ||
/** The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier. */ | ||
migrate_to_chat_id?: number; | ||
/** In case of exceeding flood control, the number of seconds left to wait before the request can be repeated */ | ||
retry_after?: number; | ||
} |
@@ -309,10 +309,2 @@ import { Location, Message, PhotoSize } from "./message"; | ||
/** Contains information about why a request was unsuccessful. */ | ||
export interface ResponseParameters { | ||
/** The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier. */ | ||
migrate_to_chat_id?: number; | ||
/** In case of exceeding flood control, the number of seconds left to wait before the request can be repeated */ | ||
retry_after?: number; | ||
} | ||
/** This object represents a file ready to be downloaded. The file can be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile. */ | ||
@@ -319,0 +311,0 @@ export interface File { |
{ | ||
"name": "@grammyjs/types", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Telegram Bot API type declarations for grammY", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
215173
3503