global-notification.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. const debug = require('debug')('growi:service:GlobalNotification');
  2. /**
  3. * the service class of GlobalNotificationSetting
  4. */
  5. class GlobalNotification {
  6. constructor() {
  7. }
  8. /**
  9. * send test notification
  10. * @memberof GlobalNotification
  11. * @param {string} toEmail
  12. */
  13. sendTesteNotification(toEmail) {}
  14. /**
  15. * send notification at page creation
  16. * @memberof GlobalNotification
  17. * @param {string} toEmail
  18. * @param {obejct} page
  19. */
  20. sendCreateNotification(toEmail, page) {
  21. // const option = {
  22. // to: toEmail,
  23. // subject: `#create - ${page.creator.username} created ${page.path}`,
  24. // template: 'notification/createPage.txt',
  25. // vars: {}
  26. // };
  27. // return mailer.send(option)
  28. }
  29. /**
  30. * send notification at page edit
  31. * @memberof GlobalNotification
  32. * @param {string} toEmail
  33. * @param {obejct} page
  34. */
  35. sendEditNotification(toEmail, page) {}
  36. /**
  37. * send notification at page deletion
  38. * @memberof GlobalNotification
  39. * @param {string} toEmail
  40. * @param {obejct} page
  41. */
  42. sendDeleteNotification(toEmail, page) {}
  43. /**
  44. * send notification at page move
  45. * @memberof GlobalNotification
  46. * @param {string} toEmail
  47. * @param {obejct} page
  48. */
  49. sendMoveNotification(toEmail, page) {}
  50. /**
  51. * send notification at page like
  52. * @memberof GlobalNotification
  53. * @param {string} toEmail
  54. * @param {obejct} page
  55. */
  56. sendLikeNotification(toEmail, page) {}
  57. /**
  58. * send notification at page comment
  59. * @memberof GlobalNotification
  60. * @param {string} toEmail
  61. * @param {obejct} page
  62. * @param {obejct} comment
  63. */
  64. sendCommentNotification(toEmail, page, comment) {}
  65. }
  66. module.exports = GlobalNotification;