-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
260 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { IPhotoSize } from "./IIPhotoSize"; | ||
|
||
/** | ||
* This object represents an audio file to be treated as music by the Telegram clients. | ||
*/ | ||
|
||
export interface IAudio { | ||
/** | ||
* Identifier for this file, which can be used to download or reuse the file | ||
*/ | ||
file_id: string; | ||
/** | ||
* Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. | ||
*/ | ||
file_unique_id: string; | ||
/** | ||
* Duration of the audio in seconds as defined by sender | ||
*/ | ||
duration: number; | ||
/** | ||
* Optional. Performer of the audio as defined by sender or by audio tags | ||
*/ | ||
performer?: string; | ||
/** | ||
* Optional. Title of the audio as defined by sender or by audio tags | ||
*/ | ||
title?: string; | ||
/** | ||
* Optional. Original filename as defined by sender | ||
*/ | ||
file_name?: string; | ||
/** | ||
* Optional. MIME type of the file as defined by sender | ||
*/ | ||
mime_type?: string; | ||
/** | ||
* Optional. File size in bytes | ||
*/ | ||
file_size?: number; | ||
/** | ||
* Optional. Thumbnail of the album cover to which the music file belongs | ||
*/ | ||
thumb?: IPhotoSize; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/** | ||
* A placeholder, currently holds no information. Use BotFather to set up your game. | ||
*/ | ||
|
||
export interface ICallbackGame {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* This object represents a phone contact. | ||
*/ | ||
|
||
export interface IContact { | ||
/** | ||
* Contact's phone number | ||
*/ | ||
phone_number: string; | ||
/** | ||
* Contact's first name | ||
*/ | ||
first_name: string; | ||
/** | ||
* Optional. Contact's last name | ||
*/ | ||
last_name?: string; | ||
/** | ||
* Optional. Contact's user identifier in Telegram. 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 64-bit integer or double-precision float type are safe for storing this identifier. | ||
*/ | ||
user_id?: number; | ||
|
||
/** | ||
* Optional. Additional data about the contact in the form of a vCard | ||
*/ | ||
vcard?: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/** | ||
* This object represents an animated emoji that displays a random value. | ||
*/ | ||
|
||
export interface IDice { | ||
/** | ||
* Emoji on which the dice throw animation is based | ||
*/ | ||
emoji: string; | ||
/** | ||
* Value of the dice, 1-6 for “🎲”, “🎯” and “🎳” base emoji, 1-5 for “🏀” and “⚽” base emoji, 1-64 for “🎰” base emoji | ||
*/ | ||
value: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** | ||
* Contains data required for decrypting and authenticating EncryptedPassportElement. See the Telegram Passport Documentation for a complete description of the data decryption and authentication processes. | ||
*/ | ||
|
||
export interface IEncryptedCredentials { | ||
/** | ||
* Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication | ||
*/ | ||
data: string; | ||
/** | ||
* Base64-encoded data hash for data authentication | ||
*/ | ||
hash: string; | ||
/** | ||
* Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption | ||
*/ | ||
secret: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/** | ||
* This object represents one size of a photo or a file / sticker thumbnail. | ||
*/ | ||
export interface IPhotoSize { | ||
/** | ||
* Identifier for this file, which can be used to download or reuse the file | ||
*/ | ||
file_id: string; | ||
/** | ||
* Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. | ||
*/ | ||
file_unique_id: string; | ||
/** | ||
* Photo width | ||
*/ | ||
width: number; | ||
/** | ||
* Photo height | ||
*/ | ||
height: number; | ||
/** | ||
* Optional. File size in bytes | ||
*/ | ||
file_size?: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/** | ||
* This object contains basic information about an invoice. | ||
*/ | ||
export interface IInvoice { | ||
/** | ||
* Product name | ||
*/ | ||
title: string; | ||
/** | ||
* Product description | ||
*/ | ||
description: string; | ||
/** | ||
* Unique bot deep-linking parameter that can be used to generate this invoice | ||
*/ | ||
start_parameter: string; | ||
/** | ||
* Three-letter ISO 4217 currency code | ||
*/ | ||
currency: string; | ||
/** | ||
* Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). | ||
*/ | ||
total_amount: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* This object describes the position on faces where a mask should be placed by default. | ||
*/ | ||
export interface IMaskPosition { | ||
/** | ||
* The part of the face relative to which the mask should be placed. One of “forehead”, “eyes”, “mouth”, or “chin”. | ||
*/ | ||
point: string; | ||
/** | ||
* Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position. | ||
*/ | ||
x_shift: number; | ||
/** | ||
* Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position. | ||
*/ | ||
y_shift: number; | ||
/** | ||
* Mask scaling coefficient. For example, 2.0 means double size. | ||
*/ | ||
scale: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don't exceed 10MB. | ||
*/ | ||
export interface IPassportFile { | ||
/** | ||
* Identifier for this file, which can be used to download or reuse the file | ||
*/ | ||
file_id: string; | ||
/** | ||
* Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. | ||
*/ | ||
file_unique_id: string; | ||
/** | ||
* File size in bytes | ||
*/ | ||
file_size: number; | ||
/** | ||
* Unix time when the file was uploaded | ||
*/ | ||
file_date: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { IOrderInfo } from "../../dist/types/IOrderInfo"; | ||
/** | ||
* This object contains basic information about a successful payment. | ||
*/ | ||
|
||
export interface ISuccessfulPayment { | ||
/** | ||
* Three-letter ISO 4217 currency code | ||
*/ | ||
currency: string; | ||
/** | ||
* Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). | ||
*/ | ||
total_amount: number; | ||
/** | ||
* Bot specified invoice payload | ||
*/ | ||
invoice_payload: string; | ||
/** | ||
* Optional. Identifier of the shipping option chosen by the user | ||
*/ | ||
shipping_option_id?: string; | ||
/** | ||
* Optional. Order info provided by the user | ||
*/ | ||
order_info?: IOrderInfo; | ||
/** | ||
* Telegram payment identifier | ||
*/ | ||
telegram_payment_charge_id: string; | ||
/** | ||
* Provider payment identifier | ||
*/ | ||
provider_payment_charge_id: string; | ||
} |