@im-more/dsh-telegram 0.0.0-stage → 0.1.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.
Files changed (122) hide show
  1. package/LICENSE +21 -0
  2. package/cordis.patch.yml +10 -0
  3. package/lib/index.js +2067 -0
  4. package/lib/index.js.map +1 -0
  5. package/lib/types/bot.d.ts +70 -0
  6. package/lib/types/bot.d.ts.map +1 -0
  7. package/lib/types/bot.js +231 -0
  8. package/lib/types/bot.js.map +1 -0
  9. package/lib/types/config.d.ts +34 -0
  10. package/lib/types/config.d.ts.map +1 -0
  11. package/lib/types/config.js +41 -0
  12. package/lib/types/config.js.map +1 -0
  13. package/lib/types/decode.d.ts +39 -0
  14. package/lib/types/decode.d.ts.map +1 -0
  15. package/lib/types/decode.js +382 -0
  16. package/lib/types/decode.js.map +1 -0
  17. package/lib/types/errors.d.ts +33 -0
  18. package/lib/types/errors.d.ts.map +1 -0
  19. package/lib/types/errors.js +89 -0
  20. package/lib/types/errors.js.map +1 -0
  21. package/lib/types/identity.d.ts +19 -0
  22. package/lib/types/identity.d.ts.map +1 -0
  23. package/lib/types/identity.js +34 -0
  24. package/lib/types/identity.js.map +1 -0
  25. package/lib/types/index.d.ts +10 -0
  26. package/lib/types/index.d.ts.map +1 -0
  27. package/lib/types/index.js +8 -0
  28. package/lib/types/index.js.map +1 -0
  29. package/lib/types/media.d.ts +38 -0
  30. package/lib/types/media.d.ts.map +1 -0
  31. package/lib/types/media.js +65 -0
  32. package/lib/types/media.js.map +1 -0
  33. package/lib/types/modes/html.d.ts +16 -0
  34. package/lib/types/modes/html.d.ts.map +1 -0
  35. package/lib/types/modes/html.js +155 -0
  36. package/lib/types/modes/html.js.map +1 -0
  37. package/lib/types/modes/plain.d.ts +14 -0
  38. package/lib/types/modes/plain.d.ts.map +1 -0
  39. package/lib/types/modes/plain.js +56 -0
  40. package/lib/types/modes/plain.js.map +1 -0
  41. package/lib/types/modes/shared.d.ts +140 -0
  42. package/lib/types/modes/shared.d.ts.map +1 -0
  43. package/lib/types/modes/shared.js +405 -0
  44. package/lib/types/modes/shared.js.map +1 -0
  45. package/lib/types/polling.d.ts +26 -0
  46. package/lib/types/polling.d.ts.map +1 -0
  47. package/lib/types/polling.js +149 -0
  48. package/lib/types/polling.js.map +1 -0
  49. package/lib/types/request.d.ts +67 -0
  50. package/lib/types/request.d.ts.map +1 -0
  51. package/lib/types/request.js +158 -0
  52. package/lib/types/request.js.map +1 -0
  53. package/lib/types/secret.d.ts +27 -0
  54. package/lib/types/secret.d.ts.map +1 -0
  55. package/lib/types/secret.js +39 -0
  56. package/lib/types/secret.js.map +1 -0
  57. package/lib/types/send.d.ts +48 -0
  58. package/lib/types/send.d.ts.map +1 -0
  59. package/lib/types/send.js +326 -0
  60. package/lib/types/send.js.map +1 -0
  61. package/lib/types/types/game.d.ts +102 -0
  62. package/lib/types/types/game.d.ts.map +1 -0
  63. package/lib/types/types/game.js +5 -0
  64. package/lib/types/types/game.js.map +1 -0
  65. package/lib/types/types/index.d.ts +2751 -0
  66. package/lib/types/types/index.d.ts.map +1 -0
  67. package/lib/types/types/index.js +88 -0
  68. package/lib/types/types/index.js.map +1 -0
  69. package/lib/types/types/inline.d.ts +796 -0
  70. package/lib/types/types/inline.d.ts.map +1 -0
  71. package/lib/types/types/inline.js +4 -0
  72. package/lib/types/types/inline.js.map +1 -0
  73. package/lib/types/types/internal.d.ts +32 -0
  74. package/lib/types/types/internal.d.ts.map +1 -0
  75. package/lib/types/types/internal.js +30 -0
  76. package/lib/types/types/internal.js.map +1 -0
  77. package/lib/types/types/passport.d.ts +229 -0
  78. package/lib/types/types/passport.d.ts.map +1 -0
  79. package/lib/types/types/passport.js +3 -0
  80. package/lib/types/types/passport.js.map +1 -0
  81. package/lib/types/types/payment.d.ts +285 -0
  82. package/lib/types/types/payment.d.ts.map +1 -0
  83. package/lib/types/types/payment.js +6 -0
  84. package/lib/types/types/payment.js.map +1 -0
  85. package/lib/types/types/sticker.d.ts +221 -0
  86. package/lib/types/types/sticker.d.ts.map +1 -0
  87. package/lib/types/types/sticker.js +11 -0
  88. package/lib/types/types/sticker.js.map +1 -0
  89. package/lib/types/types/update.d.ts +97 -0
  90. package/lib/types/types/update.d.ts.map +1 -0
  91. package/lib/types/types/update.js +6 -0
  92. package/lib/types/types/update.js.map +1 -0
  93. package/lib/types/webhook.d.ts +29 -0
  94. package/lib/types/webhook.d.ts.map +1 -0
  95. package/lib/types/webhook.js +129 -0
  96. package/lib/types/webhook.js.map +1 -0
  97. package/package.json +61 -3
  98. package/src/bot.ts +349 -0
  99. package/src/config.ts +73 -0
  100. package/src/decode.ts +472 -0
  101. package/src/errors.ts +103 -0
  102. package/src/identity.ts +41 -0
  103. package/src/index.ts +14 -0
  104. package/src/media.ts +79 -0
  105. package/src/modes/html.ts +193 -0
  106. package/src/modes/plain.ts +75 -0
  107. package/src/modes/shared.ts +505 -0
  108. package/src/polling.ts +176 -0
  109. package/src/request.ts +224 -0
  110. package/src/secret.ts +46 -0
  111. package/src/send.ts +454 -0
  112. package/src/types/.eslintrc.yml +2 -0
  113. package/src/types/game.ts +112 -0
  114. package/src/types/index.ts +3028 -0
  115. package/src/types/inline.ts +857 -0
  116. package/src/types/internal.ts +64 -0
  117. package/src/types/passport.ts +256 -0
  118. package/src/types/payment.ts +304 -0
  119. package/src/types/sticker.ts +244 -0
  120. package/src/types/update.ts +107 -0
  121. package/src/webhook.ts +168 -0
  122. package/README.md +0 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inline.d.ts","sourceRoot":"","sources":["../../../src/types/inline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,oBAAoB,EAAE,OAAO,EAAY,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAExH;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,uCAAuC;IACvC,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,aAAa;IAC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;IACrD,gBAAgB,EAAE,MAAM,CAAA;IACxB,iEAAiE;IACjE,MAAM,EAAE,iBAAiB,CAAA;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,8HAA8H;IAC9H,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC3B;AAED,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,MAAM;QACd,0CAA0C;QAC1C,YAAY,CAAC,EAAE,WAAW,CAAA;QAC1B,yNAAyN;QACzN,oBAAoB,CAAC,EAAE,kBAAkB,CAAA;KAC1C;CACF;AAED,OAAO,QAAQ,eAAe,CAAC;IAC7B,UAAU,QAAQ;QAChB;;;WAGG;QACH,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;QACtE;;;WAGG;QACH,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAA;KACjF;CACF"}
@@ -0,0 +1,4 @@
1
+ import { Internal } from "./index.js";
2
+ Internal.define('answerInlineQuery');
3
+ Internal.define('answerWebAppQuery');
4
+ //# sourceMappingURL=inline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inline.js","sourceRoot":"","sources":["../../../src/types/inline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwC,QAAQ,EAA+C,MAAM,YAAY,CAAA;AAu1BxH,QAAQ,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAA;AACpC,QAAQ,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAA"}
@@ -0,0 +1,32 @@
1
+ import { type TelegramRequest } from '../request.ts';
2
+ import type { EditMessageCaptionPayload, EditMessageTextPayload, GetUpdatesPayload, Message, SendMessagePayload, Update } from './index.ts';
3
+ /**
4
+ * Augmentation target for the typed Bot API methods registered by the
5
+ * declaration files in this directory.
6
+ */
7
+ export interface Internal {
8
+ /** Cancellable overloads for the generated methods the adapter awaits with a signal. */
9
+ sendMessage(payload: SendMessagePayload, signal?: AbortSignal): Promise<Message>;
10
+ editMessageText(payload: EditMessageTextPayload, signal?: AbortSignal): Promise<Message>;
11
+ editMessageCaption(payload: EditMessageCaptionPayload, signal?: AbortSignal): Promise<Message>;
12
+ getUpdates(payload: GetUpdatesPayload, signal?: AbortSignal): Promise<Update[]>;
13
+ }
14
+ /**
15
+ * Client for every Bot API method declared in this directory.
16
+ *
17
+ * Each declaration file ends with `Internal.define('methodName')` calls; this
18
+ * class turns them into prototype methods over the shared transport in
19
+ * `request.ts`, so the full upstream method surface stays callable
20
+ * without duplicating method bodies. The `declare module './internal.ts'`
21
+ * blocks in those files provide the parameter and return types.
22
+ */
23
+ export declare class Internal {
24
+ private readonly request;
25
+ constructor(request: TelegramRequest);
26
+ /**
27
+ * Register one Bot API method from a declaration file.
28
+ * @param method - Bot API method name.
29
+ */
30
+ static define(method: string): void;
31
+ }
32
+ //# sourceMappingURL=internal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/types/internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,eAAe,EAAE,MAAM,eAAe,CAAA;AAC5D,OAAO,KAAK,EACV,yBAAyB,EACzB,sBAAsB,EACtB,iBAAiB,EACjB,OAAO,EACP,kBAAkB,EAClB,MAAM,EACP,MAAM,YAAY,CAAA;AAEnB;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB,wFAAwF;IACxF,WAAW,CACT,OAAO,EAAE,kBAAkB,EAC3B,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,OAAO,CAAC,CAAA;IACnB,eAAe,CACb,OAAO,EAAE,sBAAsB,EAC/B,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,OAAO,CAAC,CAAA;IACnB,kBAAkB,CAChB,OAAO,EAAE,yBAAyB,EAClC,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,OAAO,CAAC,CAAA;IACnB,UAAU,CACR,OAAO,EAAE,iBAAiB,EAC1B,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;CACrB;AAED;;;;;;;;GAQG;AACH,qBAAa,QAAQ;IACP,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,eAAe;IAErD;;;OAGG;IACH,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;CAapC"}
@@ -0,0 +1,30 @@
1
+ import { invoke } from "../request.js";
2
+ /**
3
+ * Client for every Bot API method declared in this directory.
4
+ *
5
+ * Each declaration file ends with `Internal.define('methodName')` calls; this
6
+ * class turns them into prototype methods over the shared transport in
7
+ * `request.ts`, so the full upstream method surface stays callable
8
+ * without duplicating method bodies. The `declare module './internal.ts'`
9
+ * blocks in those files provide the parameter and return types.
10
+ */
11
+ export class Internal {
12
+ request;
13
+ constructor(request) {
14
+ this.request = request;
15
+ }
16
+ /**
17
+ * Register one Bot API method from a declaration file.
18
+ * @param method - Bot API method name.
19
+ */
20
+ static define(method) {
21
+ Object.defineProperty(Internal.prototype, method, {
22
+ configurable: true,
23
+ writable: true,
24
+ value: async function (data = {}, signal) {
25
+ return await invoke(this.request, method, data, signal);
26
+ },
27
+ });
28
+ }
29
+ }
30
+ //# sourceMappingURL=internal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/types/internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAwB,MAAM,eAAe,CAAA;AAkC5D;;;;;;;;GAQG;AACH,MAAM,OAAO,QAAQ;IACU;IAA7B,YAA6B,OAAwB;QAAxB,YAAO,GAAP,OAAO,CAAiB;IAAG,CAAC;IAEzD;;;OAGG;IACH,MAAM,CAAC,MAAM,CAAC,MAAc;QAC1B,MAAM,CAAC,cAAc,CAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE;YAChD,YAAY,EAAE,IAAI;YAClB,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,KAAK,WAEV,OAAe,EAAE,EACjB,MAAoB;gBAEpB,OAAO,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAA;YACzD,CAAC;SACF,CAAC,CAAA;IACJ,CAAC;CACF"}
@@ -0,0 +1,229 @@
1
+ import { Integer } from './index.ts';
2
+ /**
3
+ * Contains information about Telegram Passport data shared with the bot by the user.
4
+ * @see https://core.telegram.org/bots/api#passportdata
5
+ */
6
+ export interface PassportData {
7
+ /** Array with information about documents and other Telegram Passport elements that was shared with the bot */
8
+ data?: EncryptedPassportElement[];
9
+ /** Encrypted credentials required to decrypt the data */
10
+ credentials?: EncryptedCredentials;
11
+ }
12
+ /**
13
+ * 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.
14
+ * @see https://core.telegram.org/bots/api#passportfile
15
+ */
16
+ export interface PassportFile {
17
+ /** Identifier for this file, which can be used to download or reuse the file */
18
+ file_id?: string;
19
+ /** 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. */
20
+ file_unique_id?: string;
21
+ /** File size in bytes */
22
+ file_size?: Integer;
23
+ /** Unix time when the file was uploaded */
24
+ file_date?: Integer;
25
+ }
26
+ /**
27
+ * Contains information about documents or other Telegram Passport elements shared with the bot by the user.
28
+ * @see https://core.telegram.org/bots/api#encryptedpassportelement
29
+ */
30
+ export interface EncryptedPassportElement {
31
+ /** 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". */
32
+ type?: string;
33
+ /** Optional. 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. */
34
+ data?: string;
35
+ /** Optional. User's verified phone number, available only for "phone_number" type */
36
+ phone_number?: string;
37
+ /** Optional. User's verified email address, available only for "email" type */
38
+ email?: string;
39
+ /** Optional. 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. */
40
+ files?: PassportFile[];
41
+ /** Optional. 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. */
42
+ front_side?: PassportFile;
43
+ /** Optional. 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. */
44
+ reverse_side?: PassportFile;
45
+ /** Optional. 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. */
46
+ selfie?: PassportFile;
47
+ /** Optional. 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. */
48
+ translation?: PassportFile[];
49
+ /** Base64-encoded element hash for using in PassportElementErrorUnspecified */
50
+ hash?: string;
51
+ }
52
+ /**
53
+ * Contains data required for decrypting and authenticating EncryptedPassportElement. See the Telegram Passport Documentation for a complete description of the data decryption and authentication processes.
54
+ * @see https://core.telegram.org/bots/api#encryptedcredentials
55
+ */
56
+ export interface EncryptedCredentials {
57
+ /** Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication */
58
+ data?: string;
59
+ /** Base64-encoded data hash for data authentication */
60
+ hash?: string;
61
+ /** Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption */
62
+ secret?: string;
63
+ }
64
+ export interface SetPassportDataErrorsPayload {
65
+ /** User identifier */
66
+ user_id?: Integer;
67
+ /** A JSON-serialized array describing the errors */
68
+ errors?: PassportElementError[];
69
+ }
70
+ /**
71
+ * 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:
72
+ * - PassportElementErrorDataField
73
+ * - PassportElementErrorFrontSide
74
+ * - PassportElementErrorReverseSide
75
+ * - PassportElementErrorSelfie
76
+ * - PassportElementErrorFile
77
+ * - PassportElementErrorFiles
78
+ * - PassportElementErrorTranslationFile
79
+ * - PassportElementErrorTranslationFiles
80
+ * - PassportElementErrorUnspecified
81
+ * @see https://core.telegram.org/bots/api#passportelementerror
82
+ */
83
+ export type PassportElementError = PassportElementErrorDataField | PassportElementErrorFrontSide | PassportElementErrorReverseSide | PassportElementErrorSelfie | PassportElementErrorFile | PassportElementErrorFiles | PassportElementErrorTranslationFile | PassportElementErrorTranslationFiles | PassportElementErrorUnspecified;
84
+ /**
85
+ * 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.
86
+ * @see https://core.telegram.org/bots/api#passportelementerrordatafield
87
+ */
88
+ export interface PassportElementErrorDataField {
89
+ /** Error source, must be data */
90
+ source?: string;
91
+ /** The section of the user's Telegram Passport which has the error, one of "personal_details", "passport", "driver_license", "identity_card", "internal_passport", "address" */
92
+ type?: string;
93
+ /** Name of the data field which has the error */
94
+ field_name?: string;
95
+ /** Base64-encoded data hash */
96
+ data_hash?: string;
97
+ /** Error message */
98
+ message?: string;
99
+ }
100
+ /**
101
+ * 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.
102
+ * @see https://core.telegram.org/bots/api#passportelementerrorfrontside
103
+ */
104
+ export interface PassportElementErrorFrontSide {
105
+ /** Error source, must be front_side */
106
+ source?: string;
107
+ /** The section of the user's Telegram Passport which has the issue, one of "passport", "driver_license", "identity_card", "internal_passport" */
108
+ type?: string;
109
+ /** Base64-encoded hash of the file with the front side of the document */
110
+ file_hash?: string;
111
+ /** Error message */
112
+ message?: string;
113
+ }
114
+ /**
115
+ * 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.
116
+ * @see https://core.telegram.org/bots/api#passportelementerrorreverseside
117
+ */
118
+ export interface PassportElementErrorReverseSide {
119
+ /** Error source, must be reverse_side */
120
+ source?: string;
121
+ /** The section of the user's Telegram Passport which has the issue, one of "driver_license", "identity_card" */
122
+ type?: string;
123
+ /** Base64-encoded hash of the file with the reverse side of the document */
124
+ file_hash?: string;
125
+ /** Error message */
126
+ message?: string;
127
+ }
128
+ /**
129
+ * Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes.
130
+ * @see https://core.telegram.org/bots/api#passportelementerrorselfie
131
+ */
132
+ export interface PassportElementErrorSelfie {
133
+ /** Error source, must be selfie */
134
+ source?: string;
135
+ /** The section of the user's Telegram Passport which has the issue, one of "passport", "driver_license", "identity_card", "internal_passport" */
136
+ type?: string;
137
+ /** Base64-encoded hash of the file with the selfie */
138
+ file_hash?: string;
139
+ /** Error message */
140
+ message?: string;
141
+ }
142
+ /**
143
+ * Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes.
144
+ * @see https://core.telegram.org/bots/api#passportelementerrorfile
145
+ */
146
+ export interface PassportElementErrorFile {
147
+ /** Error source, must be file */
148
+ source?: string;
149
+ /** The section of the user's Telegram Passport which has the issue, one of "utility_bill", "bank_statement", "rental_agreement", "passport_registration", "temporary_registration" */
150
+ type?: string;
151
+ /** Base64-encoded file hash */
152
+ file_hash?: string;
153
+ /** Error message */
154
+ message?: string;
155
+ }
156
+ /**
157
+ * Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes.
158
+ * @see https://core.telegram.org/bots/api#passportelementerrorfiles
159
+ */
160
+ export interface PassportElementErrorFiles {
161
+ /** Error source, must be files */
162
+ source?: string;
163
+ /** The section of the user's Telegram Passport which has the issue, one of "utility_bill", "bank_statement", "rental_agreement", "passport_registration", "temporary_registration" */
164
+ type?: string;
165
+ /** List of base64-encoded file hashes */
166
+ file_hashes?: string[];
167
+ /** Error message */
168
+ message?: string;
169
+ }
170
+ /**
171
+ * Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes.
172
+ * @see https://core.telegram.org/bots/api#passportelementerrortranslationfile
173
+ */
174
+ export interface PassportElementErrorTranslationFile {
175
+ /** Error source, must be translation_file */
176
+ source?: string;
177
+ /** 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" */
178
+ type?: string;
179
+ /** Base64-encoded file hash */
180
+ file_hash?: string;
181
+ /** Error message */
182
+ message?: string;
183
+ }
184
+ /**
185
+ * Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation change.
186
+ * @see https://core.telegram.org/bots/api#passportelementerrortranslationfiles
187
+ */
188
+ export interface PassportElementErrorTranslationFiles {
189
+ /** Error source, must be translation_files */
190
+ source?: string;
191
+ /** 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" */
192
+ type?: string;
193
+ /** List of base64-encoded file hashes */
194
+ file_hashes?: string[];
195
+ /** Error message */
196
+ message?: string;
197
+ }
198
+ /**
199
+ * Represents an issue in an unspecified place. The error is considered resolved when new data is added.
200
+ * @see https://core.telegram.org/bots/api#passportelementerrorunspecified
201
+ */
202
+ export interface PassportElementErrorUnspecified {
203
+ /** Error source, must be unspecified */
204
+ source?: string;
205
+ /** Type of element of the user's Telegram Passport which has the issue */
206
+ type?: string;
207
+ /** Base64-encoded element hash */
208
+ element_hash?: string;
209
+ /** Error message */
210
+ message?: string;
211
+ }
212
+ declare module './index.ts' {
213
+ interface Message {
214
+ /** Optional. Telegram Passport data */
215
+ passport_data?: PassportData;
216
+ }
217
+ }
218
+ declare module './internal.ts' {
219
+ interface Internal {
220
+ /**
221
+ * Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns True on success.
222
+ *
223
+ * Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues.
224
+ * @see https://core.telegram.org/bots/api#setpassportdataerrors
225
+ */
226
+ setPassportDataErrors(payload: SetPassportDataErrorsPayload): Promise<boolean>;
227
+ }
228
+ }
229
+ //# sourceMappingURL=passport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"passport.d.ts","sourceRoot":"","sources":["../../../src/types/passport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,YAAY,CAAA;AAE9C;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,+GAA+G;IAC/G,IAAI,CAAC,EAAE,wBAAwB,EAAE,CAAA;IACjC,yDAAyD;IACzD,WAAW,CAAC,EAAE,oBAAoB,CAAA;CACnC;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,gFAAgF;IAChF,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,uJAAuJ;IACvJ,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,yBAAyB;IACzB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC,gQAAgQ;IAChQ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,mSAAmS;IACnS,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,qFAAqF;IACrF,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,+EAA+E;IAC/E,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,sRAAsR;IACtR,KAAK,CAAC,EAAE,YAAY,EAAE,CAAA;IACtB,mQAAmQ;IACnQ,UAAU,CAAC,EAAE,YAAY,CAAA;IACzB,oOAAoO;IACpO,YAAY,CAAC,EAAE,YAAY,CAAA;IAC3B,8QAA8Q;IAC9Q,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB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ACnD,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,8PAA8P;IAC9P,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,yCAAyC;IACzC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;IACtB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,+BAA+B;IAC9C,wCAAwC;IACxC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,0EAA0E;IAC1E,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,kCAAkC;IAClC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,OAAO,QAAQ,YAAY,CAAC;IAC1B,UAAU,OAAO;QACf,uCAAuC;QACvC,aAAa,CAAC,EAAE,YAAY,CAAA;KAC7B;CACF;AAED,OAAO,QAAQ,eAAe,CAAC;IAC7B,UAAU,QAAQ;QAChB;;;;;WAKG;QACH,qBAAqB,CAAC,OAAO,EAAE,4BAA4B,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;KAC/E;CACF"}
@@ -0,0 +1,3 @@
1
+ import { Internal } from "./index.js";
2
+ Internal.define('setPassportDataErrors');
3
+ //# sourceMappingURL=passport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"passport.js","sourceRoot":"","sources":["../../../src/types/passport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,QAAQ,EAAE,MAAM,YAAY,CAAA;AA+P9C,QAAQ,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAA"}