@@ -7,6 +7,9 @@ enum Provider {
77
88type ProviderType = 'telegram' | 'verifybot' | 'sms' | 'email' ;
99
10+ export type VerifyBotAuthType = 'telegram_bot' | 'qr_code' ;
11+ export type VerifyBotAuthStatus = 'pending' | 'verified' | 'expired' | 'rejected' ;
12+
1013class CreateVerifyRequest {
1114 provider ?: Provider | ProviderType | string ; // telegram, verifybot, sms, email
1215 target ?: string ; // phone, email, telegram chat id, etc.
@@ -41,7 +44,7 @@ class CreateVerifyRequestBuilder {
4144 private _timeout ?: number ;
4245 private _template ?: string ;
4346
44- constructor ( ) { }
47+ constructor ( ) { }
4548
4649 provider (
4750 provider : Provider | ProviderType | string | undefined
@@ -113,7 +116,7 @@ class VerifyMessageRequestBuilder {
113116 private _token ?: string ;
114117 private _code ?: string ;
115118
116- constructor ( ) { }
119+ constructor ( ) { }
117120
118121 token ( token : string | undefined ) : VerifyMessageRequestBuilder {
119122 this . _token = token ;
@@ -182,7 +185,7 @@ class VerifymeOptionsBuilder {
182185 private _apiKey ?: string ;
183186 private _connectionTimeout ?: number ;
184187
185- constructor ( ) { }
188+ constructor ( ) { }
186189
187190 url ( url : string | undefined ) : VerifymeOptionsBuilder {
188191 this . _url = url ;
@@ -210,6 +213,65 @@ class VerifymeOptionsBuilder {
210213 }
211214}
212215
216+ export class VerifyBotAuthCreate {
217+ target ?: string ;
218+ type ?: VerifyBotAuthType | string ;
219+
220+ constructor ( {
221+ target,
222+ type,
223+ } : {
224+ target ?: string ;
225+ type ?: VerifyBotAuthType | string ;
226+ } ) {
227+ this . target = target ;
228+ this . type = type ;
229+ }
230+
231+ static builder ( ) : VerifyBotAuthCreateBuilder {
232+ return new VerifyBotAuthCreateBuilder ( ) ;
233+ }
234+ }
235+
236+ export class VerifyBotAuthCreateBuilder {
237+ private _target ?: string ;
238+ private _type ?: VerifyBotAuthType | string ;
239+
240+ constructor ( ) { }
241+
242+ target ( target : string | undefined ) : VerifyBotAuthCreateBuilder {
243+ this . _target = target ;
244+ return this ;
245+ }
246+
247+ type ( type : VerifyBotAuthType | string | undefined ) : VerifyBotAuthCreateBuilder {
248+ this . _type = type ;
249+ return this ;
250+ }
251+
252+ build ( ) : VerifyBotAuthCreate {
253+ return new VerifyBotAuthCreate ( {
254+ target : this . _target ,
255+ type : this . _type ,
256+ } ) ;
257+ }
258+ }
259+
260+ export interface VerifyBotAuthCreated {
261+ state ?: string ;
262+ exp ?: number ;
263+ link ?: string ;
264+ qr_link ?: string ;
265+ error ?: string ;
266+ }
267+
268+ export interface VerifyBotAuthGetState {
269+ target ?: string ;
270+ status ?: VerifyBotAuthStatus | string ;
271+ data ?: any ;
272+ error ?: string ;
273+ }
274+
213275export {
214276 Provider ,
215277 ProviderType ,
0 commit comments