import { AbortablePromise, PromiseOptions } from 'better-promises'; /** * Requested contact information. */ export interface RequestedContact { contact: { user_id: number; phone_number: string; first_name: string; last_name?: string; [key: string]: unknown; }; auth_date: Date; hash: string; [key: string]: unknown; } /** * Requested contact complete data. */ export interface RequestedContactCompleteData { /** * Raw original representation of the contact data returned from the Telegram server. */ raw: string; /** * Parsed representation of the contact data. */ parsed: RequestedContact; } /** * Requests current user contact information. In contrary to requestPhoneAccess, this method * returns promise with contact information that rejects in case, user denied access, or request * failed. * * This function returns an object, containing both raw and parsed representations of the response, * received from the Telegram client. * @param options - additional options. * @since Mini Apps v6.9 * @throws {FunctionNotAvailableError} The environment is unknown * @throws {FunctionNotAvailableError} The SDK is not initialized * @throws {FunctionNotAvailableError} The function is not supported * @throws {AccessDeniedError} User denied access * @throws {ValiError} Response has invalid structure * @example * if (requestContactComplete.isAvailable()) { * const completeData = await requestContactComplete(); * } */ export declare const requestContactComplete: import('../../wrappers/wrapSafe.js').SafeWrapped<(options?: PromiseOptions) => AbortablePromise, true, never>; /** * Works the same way as the `requestContactComplete` function, but returns only parsed * representation of the contact data. * @see requestContactComplete * @param options - additional options. * @since Mini Apps v6.9 * @throws {FunctionNotAvailableError} The environment is unknown * @throws {FunctionNotAvailableError} The SDK is not initialized * @throws {FunctionNotAvailableError} The function is not supported * @throws {AccessDeniedError} User denied access * @throws {ValiError} Response has invalid structure * @example * if (requestContact.isAvailable()) { * const contact = await requestContact(); * } */ export declare const requestContact: import('../../wrappers/wrapSafe.js').SafeWrapped<(options?: PromiseOptions) => AbortablePromise, true, never>; export declare const requestContactPromise: import('@telegram-apps/signals').Computed | undefined>, isRequestingContact: import('@telegram-apps/signals').Computed; export declare const requestContactError: import('@telegram-apps/signals').Computed;