import { Rationale } from 'react-native'; import { Permission } from 'react-native-permissions'; export declare function checkPermission(permission: Permission): Promise; export declare function requestPermission(permission: Permission, rationale: Rationale): Promise; /** * This function can be used to check whether the user has given * the necessary permission for speech. * On iOS, this includes both microphone and speech recnogition. * On Android, only the microphone is needed. * * ```js * import { checkSpeech } from 'react-native-spokestack-tray' * * // ... * * const hasPermission = await checkSpeech() * ``` */ export declare function checkSpeech(): Promise; /** * This function can be used to actually request * the necessary permission for speech. * On iOS, this includes both microphone and speech recnogition. * On Android, only the microphone is needed. * * Note: if the user has declined in the past on iOS, * the user must be sent to Settings. * * ```js * import { requestSpeech } from 'react-native-spokestack-tray' * * // ... * * const hasPermission = await requestSpeech() * ``` */ export declare function requestSpeech(): Promise;