notifications.ScheduledNotification
A notification notifications.schedule shows.
Usage
Schedule a local reminder.
This type is used by notifications.schedule
// Schedule a local reminder.
import { notifications, permissions } from 'kuito';
const { status } = await permissions.request('notifications');
if (status === 'granted')
await notifications.schedule({ title: 'Your order shipped', url: 'shop://orders/42' });Type declaration
export type ScheduledNotification = {
/** Replaces the pending or shown notification with this id. Absent, the platform makes one. */
id?: string;
title: string;
body?: string;
/**
* The link a tap opens, as if it had opened the app: a `<Router linking>`
* follows it to its route (docs/notifications.md#taps).
*/
url?: string;
/** When it shows: a Date, or milliseconds since the epoch. Absent, it shows now. */
at?: Date | number;
};Members 5
| Name | Type | Required | Description |
|---|---|---|---|
id | string | No | Replaces the pending or shown notification with this id. Absent, the platform makes one. |
title | string | Yes | — |
body | string | No | — |
url | string | No | The link a tap opens, as if it had opened the app: a <Router linking>
follows it to its route (docs/notifications.md#taps). |
at | number | Date | No | When it shows: a Date, or milliseconds since the epoch. Absent, it shows now. |
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.