Add JSDoc to server/notification-providers/*

Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
This commit is contained in:
Matthew Nickson
2022-04-16 20:24:53 +01:00
parent 60c63cc18e
commit 5a209c74e1
7 changed files with 101 additions and 9 deletions

View File

@@ -37,6 +37,12 @@ class AliyunSMS extends NotificationProvider {
}
}
/**
* Send the SMS notification
* @param {BeanModel} notification Notification details
* @param {string} msgbody Message template
* @returns {boolean} True if successful else false
*/
async sendSms(notification, msgbody) {
let params = {
PhoneNumbers: notification.phonenumber,
@@ -70,7 +76,12 @@ class AliyunSMS extends NotificationProvider {
return false;
}
/** Aliyun request sign */
/**
* Aliyun request sign
* @param {Object} param Parameters object to sign
* @param {string} AccessKeySecret Secret key to sign parameters with
* @returns {string}
*/
sign(param, AccessKeySecret) {
let param2 = {};
let data = [];
@@ -93,6 +104,11 @@ class AliyunSMS extends NotificationProvider {
.digest("base64");
}
/**
* Convert status constant to string
* @param {const} status The status constant
* @returns {string}
*/
statusToString(status) {
switch (status) {
case DOWN: