UNPKG

@cranberry-money/shared-services

Version:

Platform-agnostic API services with pure functions and dependency injection. Includes auth, portfolios, assets, countries, sectors, and more.

39 lines 2.31 kB
import { AxiosInstance } from 'axios'; import type { DeviceToken, RegisterDeviceTokenRequest, UnregisterDeviceTokenRequest, NotificationPreferences, UpdateNotificationPreferencesRequest, Notification, PaginatedResponse, UnreadCountResponse, MarkAllReadResponse } from '@cranberry-money/shared-types'; /** * Register a device push token for the current user. */ export declare const registerDeviceToken: (apiClient: AxiosInstance, data: RegisterDeviceTokenRequest) => Promise<import("axios").AxiosResponse<DeviceToken, any, {}>>; /** * Unregister a device push token. */ export declare const unregisterDeviceToken: (apiClient: AxiosInstance, data: UnregisterDeviceTokenRequest) => Promise<import("axios").AxiosResponse<void, any, {}>>; /** * Get the current user's notification preferences. */ export declare const getNotificationPreferences: (apiClient: AxiosInstance) => Promise<import("axios").AxiosResponse<NotificationPreferences, any, {}>>; /** * Update the current user's notification preferences. */ export declare const updateNotificationPreferences: (apiClient: AxiosInstance, data: UpdateNotificationPreferencesRequest) => Promise<import("axios").AxiosResponse<NotificationPreferences, any, {}>>; /** * Get paginated list of in-app notifications for the current user. */ export declare const getNotifications: (apiClient: AxiosInstance) => Promise<import("axios").AxiosResponse<PaginatedResponse<Notification>, any, {}>>; /** * Get unread notification count for the current user. */ export declare const getUnreadNotificationCount: (apiClient: AxiosInstance) => Promise<import("axios").AxiosResponse<UnreadCountResponse, any, {}>>; /** * Mark a single notification as read. */ export declare const markNotificationRead: (apiClient: AxiosInstance, uuid: string) => Promise<import("axios").AxiosResponse<Notification, any, {}>>; /** * Archive a single notification (removes it from the inbox). */ export declare const archiveNotification: (apiClient: AxiosInstance, uuid: string) => Promise<import("axios").AxiosResponse<Notification, any, {}>>; /** * Mark all unread notifications as read. */ export declare const markAllNotificationsRead: (apiClient: AxiosInstance) => Promise<import("axios").AxiosResponse<MarkAllReadResponse, any, {}>>; //# sourceMappingURL=notifications.d.ts.map