@grammyjs/types 2.12.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -2
- package/api.d.ts +10 -13
- package/inline.d.ts +532 -586
- package/manage.d.ts +375 -423
- package/markup.d.ts +159 -189
- package/message.d.ts +535 -633
- package/methods.d.ts +1531 -0
- package/mod.d.ts +10 -0
- package/package.json +15 -5
- package/passport.d.ts +113 -182
- package/payment.d.ts +77 -85
- package/{menu-button.d.ts → settings.d.ts} +45 -57
- package/update.d.ts +50 -52
- package/.editorconfig +0 -8
- package/deno.jsonc +0 -1
- package/index.d.ts +0 -10
- package/proxied.d.ts +0 -1702
- /package/{index.js → mod.js} +0 -0
package/mod.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from "./api.js";
|
|
2
|
+
export * from "./inline.js";
|
|
3
|
+
export * from "./manage.js";
|
|
4
|
+
export * from "./markup.js";
|
|
5
|
+
export * from "./settings.js";
|
|
6
|
+
export * from "./message.js";
|
|
7
|
+
export * from "./passport.js";
|
|
8
|
+
export * from "./payment.js";
|
|
9
|
+
export * from "./methods.js";
|
|
10
|
+
export * from "./update.js";
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grammyjs/types",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Telegram Bot API type declarations for grammY",
|
|
5
|
-
"main": "
|
|
5
|
+
"main": "mod.js",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/grammyjs/types.git"
|
|
@@ -14,11 +14,21 @@
|
|
|
14
14
|
"api",
|
|
15
15
|
"types"
|
|
16
16
|
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"prepare": "deno task backport"
|
|
19
|
+
},
|
|
17
20
|
"author": "KnorpelSenf",
|
|
18
|
-
"types": "
|
|
21
|
+
"types": "mod.d.ts",
|
|
19
22
|
"license": "MIT",
|
|
20
23
|
"bugs": {
|
|
21
|
-
"url": "https://github.com/grammyjs/
|
|
24
|
+
"url": "https://github.com/grammyjs/types/issues"
|
|
22
25
|
},
|
|
23
|
-
"
|
|
26
|
+
"files": [
|
|
27
|
+
"*.d.ts",
|
|
28
|
+
"mod.js"
|
|
29
|
+
],
|
|
30
|
+
"homepage": "https://grammy.dev/",
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"deno-bin": "^1.31.1"
|
|
33
|
+
}
|
|
24
34
|
}
|
package/passport.d.ts
CHANGED
|
@@ -1,70 +1,53 @@
|
|
|
1
1
|
/** Describes Telegram Passport data shared with the bot by the user. */
|
|
2
2
|
export interface PassportData {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
/** Array with information about documents and other Telegram Passport elements that was shared with the bot */
|
|
4
|
+
data: EncryptedPassportElement[];
|
|
5
|
+
/** Encrypted credentials required to decrypt the data */
|
|
6
|
+
credentials: EncryptedCredentials;
|
|
7
7
|
}
|
|
8
|
-
|
|
9
8
|
/** 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. */
|
|
10
9
|
export interface PassportFile {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
/** Identifier for this file, which can be used to download or reuse the file */
|
|
11
|
+
file_id: string;
|
|
12
|
+
/** 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. */
|
|
13
|
+
file_unique_id: string;
|
|
14
|
+
/** File size in bytes */
|
|
15
|
+
file_size: number;
|
|
16
|
+
/** Unix time when the file was uploaded */
|
|
17
|
+
file_date: number;
|
|
19
18
|
}
|
|
20
|
-
|
|
21
19
|
/** Describes documents or other Telegram Passport elements shared with the bot by the user. */
|
|
22
20
|
export interface EncryptedPassportElement {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
email?: string;
|
|
44
|
-
/** Array of encrypted files with documents provided by the user, available for “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials. */
|
|
45
|
-
files?: PassportFile[];
|
|
46
|
-
/** Encrypted file with the front side of the document, provided by the user. Available for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials. */
|
|
47
|
-
front_side?: PassportFile;
|
|
48
|
-
/** Encrypted file with the reverse side of the document, provided by the user. Available for “driver_license” and “identity_card”. The file can be decrypted and verified using the accompanying EncryptedCredentials. */
|
|
49
|
-
reverse_side?: PassportFile;
|
|
50
|
-
/** Encrypted file with the selfie of the user holding a document, provided by the user; available for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials. */
|
|
51
|
-
selfie?: PassportFile;
|
|
52
|
-
/** Array of encrypted files with translated versions of documents provided by the user. Available if requested for “passport”, “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials. */
|
|
53
|
-
translation?: PassportFile[];
|
|
54
|
-
/** Base64-encoded element hash for using in PassportElementErrorUnspecified */
|
|
55
|
-
hash: string;
|
|
21
|
+
/** Element type. One of “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport”, “address”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”, “phone_number”, “email”. */
|
|
22
|
+
type: "personal_details" | "passport" | "driver_license" | "identity_card" | "internal_passport" | "address" | "utility_bill" | "bank_statement" | "rental_agreement" | "passport_registration" | "temporary_registration" | "phone_number" | "email";
|
|
23
|
+
/** Base64-encoded encrypted Telegram Passport element data provided by the user, available for “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport” and “address” types. Can be decrypted and verified using the accompanying EncryptedCredentials. */
|
|
24
|
+
data?: string;
|
|
25
|
+
/** User's verified phone number, available only for “phone_number” type */
|
|
26
|
+
phone_number?: string;
|
|
27
|
+
/** User's verified email address, available only for “email” type */
|
|
28
|
+
email?: string;
|
|
29
|
+
/** Array of encrypted files with documents provided by the user, available for “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials. */
|
|
30
|
+
files?: PassportFile[];
|
|
31
|
+
/** Encrypted file with the front side of the document, provided by the user. Available for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials. */
|
|
32
|
+
front_side?: PassportFile;
|
|
33
|
+
/** Encrypted file with the reverse side of the document, provided by the user. Available for “driver_license” and “identity_card”. The file can be decrypted and verified using the accompanying EncryptedCredentials. */
|
|
34
|
+
reverse_side?: PassportFile;
|
|
35
|
+
/** Encrypted file with the selfie of the user holding a document, provided by the user; available for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials. */
|
|
36
|
+
selfie?: PassportFile;
|
|
37
|
+
/** Array of encrypted files with translated versions of documents provided by the user. Available if requested for “passport”, “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials. */
|
|
38
|
+
translation?: PassportFile[];
|
|
39
|
+
/** Base64-encoded element hash for using in PassportElementErrorUnspecified */
|
|
40
|
+
hash: string;
|
|
56
41
|
}
|
|
57
|
-
|
|
58
42
|
/** Describes data required for decrypting and authenticating EncryptedPassportElement. See the Telegram Passport Documentation for a complete description of the data decryption and authentication processes. */
|
|
59
43
|
export interface EncryptedCredentials {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
44
|
+
/** Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication */
|
|
45
|
+
data: string;
|
|
46
|
+
/** Base64-encoded data hash for data authentication */
|
|
47
|
+
hash: string;
|
|
48
|
+
/** Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption */
|
|
49
|
+
secret: string;
|
|
66
50
|
}
|
|
67
|
-
|
|
68
51
|
/** This object represents an error in the Telegram Passport element which was submitted that should be resolved by the user. It should be one of:
|
|
69
52
|
- PassportElementErrorDataField
|
|
70
53
|
- PassportElementErrorFrontSide
|
|
@@ -76,157 +59,105 @@ export interface EncryptedCredentials {
|
|
|
76
59
|
- PassportElementErrorTranslationFiles
|
|
77
60
|
- PassportElementErrorUnspecified
|
|
78
61
|
*/
|
|
79
|
-
export type PassportElementError =
|
|
80
|
-
| PassportElementErrorDataField
|
|
81
|
-
| PassportElementErrorFrontSide
|
|
82
|
-
| PassportElementErrorReverseSide
|
|
83
|
-
| PassportElementErrorSelfie
|
|
84
|
-
| PassportElementErrorFile
|
|
85
|
-
| PassportElementErrorFiles
|
|
86
|
-
| PassportElementErrorTranslationFile
|
|
87
|
-
| PassportElementErrorTranslationFiles
|
|
88
|
-
| PassportElementErrorUnspecified;
|
|
89
|
-
|
|
62
|
+
export type PassportElementError = PassportElementErrorDataField | PassportElementErrorFrontSide | PassportElementErrorReverseSide | PassportElementErrorSelfie | PassportElementErrorFile | PassportElementErrorFiles | PassportElementErrorTranslationFile | PassportElementErrorTranslationFiles | PassportElementErrorUnspecified;
|
|
90
63
|
/** Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes. */
|
|
91
64
|
export interface PassportElementErrorDataField {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
/** Name of the data field which has the error */
|
|
103
|
-
field_name: string;
|
|
104
|
-
/** Base64-encoded data hash */
|
|
105
|
-
data_hash: string;
|
|
106
|
-
/** Error message */
|
|
107
|
-
message: string;
|
|
65
|
+
/** Error source, must be data */
|
|
66
|
+
source: "data";
|
|
67
|
+
/** The section of the user's Telegram Passport which has the error, one of “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport”, “address” */
|
|
68
|
+
type: "personal_details" | "passport" | "driver_license" | "identity_card" | "internal_passport" | "address";
|
|
69
|
+
/** Name of the data field which has the error */
|
|
70
|
+
field_name: string;
|
|
71
|
+
/** Base64-encoded data hash */
|
|
72
|
+
data_hash: string;
|
|
73
|
+
/** Error message */
|
|
74
|
+
message: string;
|
|
108
75
|
}
|
|
109
|
-
|
|
110
76
|
/** Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes. */
|
|
111
77
|
export interface PassportElementErrorFrontSide {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
78
|
+
/** Error source, must be front_side */
|
|
79
|
+
source: "front_side";
|
|
80
|
+
/** The section of the user's Telegram Passport which has the issue, one of “passport”, “driver_license”, “identity_card”, “internal_passport” */
|
|
81
|
+
type: "passport" | "driver_license" | "identity_card" | "internal_passport";
|
|
82
|
+
/** Base64-encoded hash of the file with the front side of the document */
|
|
83
|
+
file_hash: string;
|
|
84
|
+
/** Error message */
|
|
85
|
+
message: string;
|
|
120
86
|
}
|
|
121
|
-
|
|
122
87
|
/** Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes. */
|
|
123
88
|
export interface PassportElementErrorReverseSide {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
89
|
+
/** Error source, must be reverse_side */
|
|
90
|
+
source: "reverse_side";
|
|
91
|
+
/** The section of the user's Telegram Passport which has the issue, one of “driver_license”, “identity_card” */
|
|
92
|
+
type: "driver_license" | "identity_card";
|
|
93
|
+
/** Base64-encoded hash of the file with the reverse side of the document */
|
|
94
|
+
file_hash: string;
|
|
95
|
+
/** Error message */
|
|
96
|
+
message: string;
|
|
132
97
|
}
|
|
133
|
-
|
|
134
98
|
/** Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes. */
|
|
135
99
|
export interface PassportElementErrorSelfie {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
100
|
+
/** Error source, must be selfie */
|
|
101
|
+
source: "selfie";
|
|
102
|
+
/** The section of the user's Telegram Passport which has the issue, one of “passport”, “driver_license”, “identity_card”, “internal_passport” */
|
|
103
|
+
type: "passport" | "driver_license" | "identity_card" | "internal_passport";
|
|
104
|
+
/** Base64-encoded hash of the file with the selfie */
|
|
105
|
+
file_hash: string;
|
|
106
|
+
/** Error message */
|
|
107
|
+
message: string;
|
|
144
108
|
}
|
|
145
|
-
|
|
146
109
|
/** Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes. */
|
|
147
110
|
export interface PassportElementErrorFile {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
| "temporary_registration";
|
|
157
|
-
/** Base64-encoded file hash */
|
|
158
|
-
file_hash: string;
|
|
159
|
-
/** Error message */
|
|
160
|
-
message: string;
|
|
111
|
+
/** Error source, must be file */
|
|
112
|
+
source: "file";
|
|
113
|
+
/** The section of the user's Telegram Passport which has the issue, one of “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration” */
|
|
114
|
+
type: "utility_bill" | "bank_statement" | "rental_agreement" | "passport_registration" | "temporary_registration";
|
|
115
|
+
/** Base64-encoded file hash */
|
|
116
|
+
file_hash: string;
|
|
117
|
+
/** Error message */
|
|
118
|
+
message: string;
|
|
161
119
|
}
|
|
162
|
-
|
|
163
120
|
/** Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes. */
|
|
164
121
|
export interface PassportElementErrorFiles {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
| "temporary_registration";
|
|
174
|
-
/** List of base64-encoded file hashes */
|
|
175
|
-
file_hashes: string[];
|
|
176
|
-
/** Error message */
|
|
177
|
-
message: string;
|
|
122
|
+
/** Error source, must be files */
|
|
123
|
+
source: "files";
|
|
124
|
+
/** The section of the user's Telegram Passport which has the issue, one of “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration” */
|
|
125
|
+
type: "utility_bill" | "bank_statement" | "rental_agreement" | "passport_registration" | "temporary_registration";
|
|
126
|
+
/** List of base64-encoded file hashes */
|
|
127
|
+
file_hashes: string[];
|
|
128
|
+
/** Error message */
|
|
129
|
+
message: string;
|
|
178
130
|
}
|
|
179
|
-
|
|
180
131
|
/** Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes. */
|
|
181
132
|
export interface PassportElementErrorTranslationFile {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
| "utility_bill"
|
|
191
|
-
| "bank_statement"
|
|
192
|
-
| "rental_agreement"
|
|
193
|
-
| "passport_registration"
|
|
194
|
-
| "temporary_registration";
|
|
195
|
-
/** Base64-encoded file hash */
|
|
196
|
-
file_hash: string;
|
|
197
|
-
/** Error message */
|
|
198
|
-
message: string;
|
|
133
|
+
/** Error source, must be translation_file */
|
|
134
|
+
source: "translation_file";
|
|
135
|
+
/** Type of element of the user's Telegram Passport which has the issue, one of “passport”, “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration” */
|
|
136
|
+
type: "passport" | "driver_license" | "identity_card" | "internal_passport" | "utility_bill" | "bank_statement" | "rental_agreement" | "passport_registration" | "temporary_registration";
|
|
137
|
+
/** Base64-encoded file hash */
|
|
138
|
+
file_hash: string;
|
|
139
|
+
/** Error message */
|
|
140
|
+
message: string;
|
|
199
141
|
}
|
|
200
|
-
|
|
201
142
|
/** Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation change. */
|
|
202
143
|
export interface PassportElementErrorTranslationFiles {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
| "utility_bill"
|
|
212
|
-
| "bank_statement"
|
|
213
|
-
| "rental_agreement"
|
|
214
|
-
| "passport_registration"
|
|
215
|
-
| "temporary_registration";
|
|
216
|
-
/** List of base64-encoded file hashes */
|
|
217
|
-
file_hashes: string[];
|
|
218
|
-
/** Error message */
|
|
219
|
-
message: string;
|
|
144
|
+
/** Error source, must be translation_files */
|
|
145
|
+
source: "translation_files";
|
|
146
|
+
/** Type of element of the user's Telegram Passport which has the issue, one of “passport”, “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration” */
|
|
147
|
+
type: "passport" | "driver_license" | "identity_card" | "internal_passport" | "utility_bill" | "bank_statement" | "rental_agreement" | "passport_registration" | "temporary_registration";
|
|
148
|
+
/** List of base64-encoded file hashes */
|
|
149
|
+
file_hashes: string[];
|
|
150
|
+
/** Error message */
|
|
151
|
+
message: string;
|
|
220
152
|
}
|
|
221
|
-
|
|
222
153
|
/** Represents an issue in an unspecified place. The error is considered resolved when new data is added. */
|
|
223
154
|
export interface PassportElementErrorUnspecified {
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
155
|
+
/** Error source, must be unspecified */
|
|
156
|
+
source: "unspecified";
|
|
157
|
+
/** Type of element of the user's Telegram Passport which has the issue */
|
|
158
|
+
type: string;
|
|
159
|
+
/** Base64-encoded element hash */
|
|
160
|
+
element_hash: string;
|
|
161
|
+
/** Error message */
|
|
162
|
+
message: string;
|
|
232
163
|
}
|
package/payment.d.ts
CHANGED
|
@@ -1,109 +1,101 @@
|
|
|
1
|
-
import { User } from "./manage";
|
|
2
|
-
|
|
1
|
+
import type { User } from "./manage.js";
|
|
3
2
|
/** This object represents a portion of the price for goods or services. */
|
|
4
3
|
export interface LabeledPrice {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
/** Portion label */
|
|
5
|
+
label: string;
|
|
6
|
+
/** Price of the product 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). */
|
|
7
|
+
amount: number;
|
|
9
8
|
}
|
|
10
|
-
|
|
11
9
|
/** This object contains basic information about an invoice. */
|
|
12
10
|
export interface Invoice {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
11
|
+
/** Product name */
|
|
12
|
+
title: string;
|
|
13
|
+
/** Product description */
|
|
14
|
+
description: string;
|
|
15
|
+
/** Unique bot deep-linking parameter that can be used to generate this invoice */
|
|
16
|
+
start_parameter: string;
|
|
17
|
+
/** Three-letter ISO 4217 currency code */
|
|
18
|
+
currency: string;
|
|
19
|
+
/** 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). */
|
|
20
|
+
total_amount: number;
|
|
23
21
|
}
|
|
24
|
-
|
|
25
22
|
/** This object represents a shipping address. */
|
|
26
23
|
export interface ShippingAddress {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
24
|
+
/** Two-letter ISO 3166-1 alpha-2 country code */
|
|
25
|
+
country_code: string;
|
|
26
|
+
/** State, if applicable */
|
|
27
|
+
state: string;
|
|
28
|
+
/** City */
|
|
29
|
+
city: string;
|
|
30
|
+
/** First line for the address */
|
|
31
|
+
street_line1: string;
|
|
32
|
+
/** Second line for the address */
|
|
33
|
+
street_line2: string;
|
|
34
|
+
/** Address post code */
|
|
35
|
+
post_code: string;
|
|
39
36
|
}
|
|
40
|
-
|
|
41
37
|
/** This object represents information about an order. */
|
|
42
38
|
export interface OrderInfo {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
39
|
+
/** User name */
|
|
40
|
+
name?: string;
|
|
41
|
+
/** User's phone number */
|
|
42
|
+
phone_number?: string;
|
|
43
|
+
/** User email */
|
|
44
|
+
email?: string;
|
|
45
|
+
/** User shipping address */
|
|
46
|
+
shipping_address?: ShippingAddress;
|
|
51
47
|
}
|
|
52
|
-
|
|
53
48
|
/** This object represents one shipping option. */
|
|
54
49
|
export interface ShippingOption {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
50
|
+
/** Shipping option identifier */
|
|
51
|
+
id: string;
|
|
52
|
+
/** Option title */
|
|
53
|
+
title: string;
|
|
54
|
+
/** List of price portions */
|
|
55
|
+
prices: LabeledPrice[];
|
|
61
56
|
}
|
|
62
|
-
|
|
63
57
|
/** This object contains basic information about a successful payment. */
|
|
64
58
|
export interface SuccessfulPayment {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
59
|
+
/** Three-letter ISO 4217 currency code */
|
|
60
|
+
currency: string;
|
|
61
|
+
/** 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). */
|
|
62
|
+
total_amount: number;
|
|
63
|
+
/** Bot specified invoice payload */
|
|
64
|
+
invoice_payload: string;
|
|
65
|
+
/** Identifier of the shipping option chosen by the user */
|
|
66
|
+
shipping_option_id?: string;
|
|
67
|
+
/** Order information provided by the user */
|
|
68
|
+
order_info?: OrderInfo;
|
|
69
|
+
/** Telegram payment identifier */
|
|
70
|
+
telegram_payment_charge_id: string;
|
|
71
|
+
/** Provider payment identifier */
|
|
72
|
+
provider_payment_charge_id: string;
|
|
79
73
|
}
|
|
80
|
-
|
|
81
74
|
/** This object contains information about an incoming shipping query. */
|
|
82
75
|
export interface ShippingQuery {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
76
|
+
/** Unique query identifier */
|
|
77
|
+
id: string;
|
|
78
|
+
/** User who sent the query */
|
|
79
|
+
from: User;
|
|
80
|
+
/** Bot specified invoice payload */
|
|
81
|
+
invoice_payload: string;
|
|
82
|
+
/** User specified shipping address */
|
|
83
|
+
shipping_address: ShippingAddress;
|
|
91
84
|
}
|
|
92
|
-
|
|
93
85
|
/** This object contains information about an incoming pre-checkout query. */
|
|
94
86
|
export interface PreCheckoutQuery {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
87
|
+
/** Unique query identifier */
|
|
88
|
+
id: string;
|
|
89
|
+
/** User who sent the query */
|
|
90
|
+
from: User;
|
|
91
|
+
/** Three-letter ISO 4217 currency code */
|
|
92
|
+
currency: string;
|
|
93
|
+
/** 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). */
|
|
94
|
+
total_amount: number;
|
|
95
|
+
/** Bot specified invoice payload */
|
|
96
|
+
invoice_payload: string;
|
|
97
|
+
/** Identifier of the shipping option chosen by the user */
|
|
98
|
+
shipping_option_id?: string;
|
|
99
|
+
/** Order information provided by the user */
|
|
100
|
+
order_info?: OrderInfo;
|
|
109
101
|
}
|