Socket
Socket
Sign inDemoInstall

@anzuev/notify

Package Overview
Dependencies
40
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @anzuev/notify

Notification service for StudCloud project


Version published
Maintainers
1
Created

Readme

Source

Notify

Notify~Notify

Kind: inner class of Notify
Friend: BaseNotification

Notify.configure(config)

Настройка модуля(логгера)

Kind: static method of Notify

ParamDescription
configконфиг типа nconf

Notify.setMailAccounts(accounts) ⇒

Передача почтовых аккаунтов, с которых будут слаться уведомления

Kind: static method of Notify
Returns: void

ParamDescription
accountsаккаунты для связки

Example

let accounts = {
		mailConfirm: { // название нотификации
		mail: 'auth@istudentapp.ru', // какой адрес используем
			password: "quetbxdfpzhtsnid", // какой пароль к ящику
			htmlTemp: "/Users/anton/GitHub/Notify/templates/MailConfirm.html" // путь к шаблону письма
		},
		restorePassword: {
			mail: "auth@istudentapp.ru",
			password: "quetbxdfpzhtsnid"
		}
	};
Notify.setMailAccounts(accounts);

Notify.getMailConfirmNotification() ⇒ MailConfirmationNotification

Получение класса для создания нотификации для подтверждения почты

Kind: static method of Notify
Throws:

  • ValidationError , code = 500, Модуль Notify не был настроен(Notify.configure and Notify.setMailAccounts)

Notify~BaseNotification

Класс для представления нотификации по почте. Здесь определены сеттеры/геттеры для нотификации, а также отправка в общем случае(без рендеринга сообщения)

Kind: inner class of Notify
Properties

NameTypeDescription
subjectStringтема письма
ccArray.<String>массив адрессов в открытой копии
bccArray.<String>массив адрессов в закрытой копии
typeStringтип нотификации(mailConfirm и тд)
htmlStringhtml-содержимое письма
textStingraw-содержимое пиьсма
attachmentмассив прикрепленных докумнетов(не реализовано)

baseNotification.setCc(addresses)

Установка адресов в копию

Kind: instance method of BaseNotification

ParamTypeDescription
addressesArray.<String>адреса

baseNotification.setBcc(addresses)

Установка адресов в скрытую копию

Kind: instance method of BaseNotification

ParamTypeDescription
addressesArray.<String>адреса

baseNotification.setHtml(html)

Установка html-содержимого для письма

Kind: instance method of BaseNotification

ParamTypeDescription
htmlStringhtml-содержимое

baseNotification.setText(text)

Установка raw-содержимого для письма

Kind: instance method of BaseNotification

ParamTypeDescription
textStringraw-содержимое

baseNotification.setSubject(subject)

Установка темы для письма

Kind: instance method of BaseNotification

ParamTypeDescription
subjectStringsubject-содержимое

baseNotification.getType() ⇒ String

Получение типа

Kind: instance method of BaseNotification
Returns: String - type

baseNotification.getHtml() ⇒ String

Получение html-содержимого

Kind: instance method of BaseNotification
Returns: String - html

baseNotification.getText() ⇒ String

Получение raw-текста

Kind: instance method of BaseNotification
Returns: String - text

baseNotification.getSubject() ⇒ String

Получение темы

Kind: instance method of BaseNotification
Returns: String - topic

baseNotification.getCc() ⇒ Array.<String>

Получение копии

Kind: instance method of BaseNotification
Returns: Array.<String> - сс

baseNotification.getBcc() ⇒ Array.<String>

Получение скрытой копии

Kind: instance method of BaseNotification
Returns: Array.<String> - bсс

BaseNotification.BaseNotification

Kind: static class of BaseNotification

new BaseNotification()

Конструктор, создает новую нотификацию

Notify~MailConfirmationNotification ⇐ BaseNotification

Класс, представляющий нотификацию, отправляемую на почту, для подтверждения почты. Наследуется от Base

Kind: inner class of Notify
Extends: BaseNotification

mailConfirmationNotification.sendToMany(users) ⇒ void

Отправка уведомления нескольким пользователям

Kind: instance method of MailConfirmationNotification
Access: public

ParamTypeDescription
usersArray.<String>массив адресов для отправки

mailConfirmationNotification.sendToOne(user) ⇒ void

Отправка уведомления одному пользователю

Kind: instance method of MailConfirmationNotification
Access: public

ParamTypeDescription
userStringадрес для отправки

MailConfirmationNotification.MailConfirmationNotification

Kind: static class of MailConfirmationNotification
Access: public

Конструктор для MailConfirmationNotification

ParamDescription
linkссылка для подтверждения почты(уже с вставленной почтой и ключом) Формат - host + /auth/confirmMail?mail=%s&key=%s

Keywords

FAQs

Last updated on 03 Aug 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc