UNPKG

@telegram-apps/sdk

Version:

TypeScript Source Development Kit for Telegram Mini Apps client application.

23 lines (22 loc) 1.36 kB
import { RequestOptionsNoCapture } from '../../../types.js'; /** * Requests current user phone access. Method returns promise, which resolves * status of the request. In case, user accepted the request, Mini App bot will receive * the according notification. * * To obtain the retrieved information instead, utilize the `requestContact` method. * @param options - additional options. * @since Mini Apps v6.9 * @see requestContact * @throws {ConcurrentCallError} Phone access request is currently in progress * @throws {FunctionNotAvailableError} The environment is unknown * @throws {FunctionNotAvailableError} The SDK is not initialized * @throws {FunctionNotAvailableError} The function is not supported * @example * if (requestPhoneAccess.isAvailable()) { * const status = await requestPhoneAccess(); * } */ export declare const requestPhoneAccess: import('../../wrappers/wrapSafe.js').SafeWrapped<(options?: RequestOptionsNoCapture) => import('better-promises').AbortablePromise<any>, true, never>; export declare const requestPhoneAccessPromise: import('@telegram-apps/signals').Computed<import('better-promises').AbortablePromise<any> | undefined>, isRequestingPhoneAccess: import('@telegram-apps/signals').Computed<boolean>; export declare const requestPhoneAccessError: import('@telegram-apps/signals').Computed<Error | undefined>;