UNPKG

@magicbell/core

Version:

Official MagicBell API wrapper

21 lines (20 loc) 677 B
import IRemoteNotificationPreferences from './IRemoteNotificationPreferences.js'; /** * Class to interact with the user preferences API endpoints. * * @example * const repo = new NotificationPreferencesRepository(); * await repo.update({ categories: { comment: commentPreferences } }); */ export default class NotificationPreferencesRepository { remotePathOrUrl: string; constructor(remotePathOrUrl?: string); /** * Get the user preferences from the API server. */ get(): Promise<IRemoteNotificationPreferences>; /** * Update user preferences in the API server. */ update(data: any): Promise<IRemoteNotificationPreferences>; }