UNPKG

notification-services

Version:

Use email, sms and custom notification services for node.js application easily

62 lines (61 loc) 2.41 kB
import { FCMv1, fcmConfig, fcmSend, fcmSendToToken, fcmSendToTopic, fcmSendToCondition, fcmSendMulticast, FCMConfig, FCMMessage, FCMResponse, FCMSendOptions, FCMServiceAccountKey, FCMData, FCMNotification, FCMAndroidConfig, FCMApnsConfig, FCMWebpushConfig } from "./fcm"; import nodemailer, { SentMessageInfo } from "nodemailer"; export declare const mailConfig: (type: string, options: { path?: string; newline?: string; awsAccessId?: string; awsAccessKey?: string; apiVersion?: string; region?: string; host?: string; user?: string; pass?: string; }, callback: { (res: any, err: any): void; (arg0: {} | null, arg1: Error | null): void; }) => void; export declare const sendMail: (transporter: nodemailer.Transporter<SentMessageInfo>, mailOptions: { from?: string; to?: string; cc?: string; bcc?: string; subject?: string; text?: string; html?: string; attachments?: []; }, template: boolean, callback: (res: any, err: any) => void) => void; export declare const SMSSend: (type: string, options: { userId?: string; password?: string; mask?: string; appid?: string; apiKey?: string; twilioAuthToken?: string; twilioAccountSid?: string; from?: string; to?: string; message?: string; senderId?: string; fast2smsRoute?: string; }, callback: (res: any, err: any) => void) => void; /** * @deprecated * This function uses the legacy FCM HTTP API (not FCM v1). * It sends a custom notification to devices via Firebase Cloud Messaging (FCM). * Please migrate to FCM v1 API for new projects. * @use * * @param options - The notification options: * - serverKey: The FCM server key (legacy, not OAuth2). * - title: The notification title. * - text: The notification body text. * - fcm_tokens: Array of FCM device tokens to send the notification to. * @param callback - Callback function with (response, error). */ export declare const sendCustomNotification: (options: { serverKey?: string; title?: string; text?: string; fcm_tokens?: string[]; }, callback: (res: any, err: any) => void) => void; export { FCMv1, fcmConfig, fcmSend, fcmSendToToken, fcmSendToTopic, fcmSendToCondition, fcmSendMulticast, FCMConfig, FCMMessage, FCMResponse, FCMSendOptions, FCMServiceAccountKey, FCMData, FCMNotification, FCMAndroidConfig, FCMApnsConfig, FCMWebpushConfig, };