rn-sms-reader
Version:
This package reads Android text messages.
26 lines • 983 B
TypeScript
/**
* RnSmsService provides functions to check, request SMS permissions,
* and fetch SMS messages to extract OTP.
*/
declare const RnSmsService: {
/**
* Checks if SMS permissions are already granted.
* @returns A Promise that resolves to true if both permissions are granted, false otherwise.
*/
checkingSmsPermission: () => Promise<boolean>;
/**
* Requests SMS permissions and returns a Promise indicating success.
* @returns A Promise that resolves to true if permissions are granted, false otherwise.
*/
requestSmsPermission: () => Promise<boolean>;
/**
* Fetches SMS messages and extracts OTP.
* @param length - Length of the OTP to be extracted from the SMS.
* @returns A Promise that resolves to an object containing the extracted OTP or undefined.
*/
fetchSms: (length: number) => Promise<{
otp: string | undefined;
}>;
};
export default RnSmsService;
//# sourceMappingURL=index.d.ts.map