UNPKG

magicbell

Version:
39 lines (38 loc) 1.76 kB
import { type FromSchema } from 'json-schema-to-ts'; import { Resource } from '../client/resource.js'; import { type RequestOptions } from '../client/types.js'; import * as schemas from '../schemas/notification-preferences.js'; type GetNotificationPreferencesResponse = FromSchema<typeof schemas.GetNotificationPreferencesResponseSchema>; type UpdateNotificationPreferencesResponse = FromSchema<typeof schemas.UpdateNotificationPreferencesResponseSchema>; type UpdateNotificationPreferencesPayload = FromSchema<typeof schemas.UpdateNotificationPreferencesPayloadSchema>; export declare class NotificationPreferences extends Resource { path: string; entity: string; /** * Fetch a user's notification preferences. If a user does not disable a channel * explicitly, we would send notifications through that channel as long as your * project is enabled. * * @param options - override client request options. * @returns **/ get(options?: RequestOptions): Promise<GetNotificationPreferencesResponse>; /** * Update a user's notification preferences. These preferences will be applied only * to channels you enabled for your project. * * @param options - override client request options. * @returns **/ update(options?: RequestOptions): Promise<UpdateNotificationPreferencesResponse>; /** * Update a user's notification preferences. These preferences will be applied only * to channels you enabled for your project. * * @param data * @param options - override client request options. * @returns **/ update(data: UpdateNotificationPreferencesPayload, options?: RequestOptions): Promise<UpdateNotificationPreferencesResponse>; } export {};