- App.tsx: full navigation (Auth stack + Main tabs with 5 screens) - Auth: LoginScreen, RegisterScreen, ForgotPasswordScreen - HomeScreen: dashboard with IoT metrics, weather widget, alerts, quick actions, sensors - MapScreen: interactive map with layer toggles (6 layers) - MarketplaceScreen: categories (6), products (5), search - ChatScreen: AI chat with quick prompts (4), bot responses - ProfileScreen: user info, stats, menu (9 items), logout - AlertsScreen: alert list with severity, acknowledge - SensorsScreen: sensor list with type filters (6 types), search - ZonesScreen: zone cards with stats - SettingsScreen: language picker (FR/EN/ES/DE), privacy, about - Stores: iotStore (sensors, zones, alerts), notificationStore, uiStore + i18n - Hooks: useSensors, useAlerts, useNotifications, useLocation - Components: Card, Button, LoadingSpinner, ErrorBoundary, Header - Services: iotService, notificationService (with axios API client) - Utils: formatters (temp, AQI, noise, dates), validators (email, password, IBAN) - Theme: colors.ts with full design system (Blue Ocean palette) - Ditto: fixed MongoDB connection, new JWT secrets, official gateway image
60 lines
2.2 KiB
TypeScript
60 lines
2.2 KiB
TypeScript
import { NotificationTriggerInput as NativeNotificationTriggerInput } from './NotificationScheduler.types';
|
|
import { NotificationRequestInput, NotificationTriggerInput } from './Notifications.types';
|
|
/**
|
|
* Schedules a notification to be triggered in the future.
|
|
* > **Note:** Please note that this does not mean that the notification will be presented when it is triggered.
|
|
* For the notification to be presented you have to set a notification handler with [`setNotificationHandler`](#notificationssetnotificationhandlerhandler)
|
|
* that will return an appropriate notification behavior. For more information see the example below.
|
|
* @param request An object describing the notification to be triggered.
|
|
* @return Returns a Promise resolving to a string which is a notification identifier you can later use to cancel the notification or to identify an incoming notification.
|
|
* @example
|
|
* # Schedule the notification that will trigger once, in one minute from now
|
|
* ```ts
|
|
* import * as Notifications from 'expo-notifications';
|
|
*
|
|
* Notifications.scheduleNotificationAsync({
|
|
* content: {
|
|
* title: "Time's up!",
|
|
* body: 'Change sides!',
|
|
* },
|
|
* trigger: {
|
|
* seconds: 60,
|
|
* },
|
|
* });
|
|
* ```
|
|
*
|
|
* # Schedule the notification that will trigger repeatedly, every 20 minutes
|
|
* ```ts
|
|
* import * as Notifications from 'expo-notifications';
|
|
*
|
|
* Notifications.scheduleNotificationAsync({
|
|
* content: {
|
|
* title: 'Remember to drink water!',
|
|
* },
|
|
* trigger: {
|
|
* seconds: 60 * 20,
|
|
* repeats: true,
|
|
* },
|
|
* });
|
|
* ```
|
|
*
|
|
* # Schedule the notification that will trigger once, at the beginning of next hour
|
|
* ```ts
|
|
* import * as Notifications from 'expo-notifications';
|
|
*
|
|
* const trigger = new Date(Date.now() + 60 * 60 * 1000);
|
|
* trigger.setMinutes(0);
|
|
* trigger.setSeconds(0);
|
|
*
|
|
* Notifications.scheduleNotificationAsync({
|
|
* content: {
|
|
* title: 'Happy new hour!',
|
|
* },
|
|
* trigger,
|
|
* });
|
|
* ```
|
|
* @header schedule
|
|
*/
|
|
export default function scheduleNotificationAsync(request: NotificationRequestInput): Promise<string>;
|
|
export declare function parseTrigger(userFacingTrigger: NotificationTriggerInput): NativeNotificationTriggerInput;
|
|
//# sourceMappingURL=scheduleNotificationAsync.d.ts.map
|