UNPKG

@dderevjanik/termux-api

Version:

This library allows you to interact with your Android device from Node.js using termux-api

61 lines (60 loc) 1.34 kB
export interface Message { /** * The ID of the thread * @example 109 */ threadid: number; /** * The type of the message * @example "inbox" */ type: string; /** * The read status of the message * @example false */ read: boolean; /** * The number associated with the message * @example "950" */ number: string; /** * The received timestamp of the message * @example "2024-12-19 17:15:40" */ received: string; /** * The body content of the message * @example "Nechajte starosti plavat a zdielajte bezstarostne Vianoce s rodinou a nekonecnymi datami" */ body: string; /** * The unique ID of the message * @example 1016 */ _id: number; } export interface SmsListOptions { /** * limit in retrieved sms list * @default 10 */ limit?: number; /** * offset in sms list * @default 0 */ offset?: number; /** * the type of messages to list * @default "all" */ type?: "all" | "inbox" | "sent" | "draft" | "outbox"; } /** * List sms messages * * **Requires permission:** `android.permission.READ_SMS` and `android.permission.READ_CONTACTS` */ export declare function smsList(options?: SmsListOptions): Promise<Message[]>;