Skip to content

Commit

Permalink
feat: Implement Product Lifecycle Notification System (#92)
Browse files Browse the repository at this point in the history
* fix(review-swagger-docs): fix swagger documentation of thereview task (#114)

- add missing security tag in review docs

[Fixes #113]

* fix(create-review): fix failing create review function

-add validation before processing data

[Fixes #116]

* fix(create-review): fix failing create review function

-add validation before processing data

[Fixes #116]

dockerizing project by creating containers for app & postgres (#110)

fix minor issue in deployment of render

latest commit

 Update Readme file to include Docker-specific information

 Update Readme file to include Docker-specific information

fix(review-swagger-docs): fix swagger documentation of thereview task (#114) (#115)

- add missing security tag in review docs

[Fixes #113]

update profile (#72) (#104)

review controller

adding testing

fix lint issue

update profile (#72) (#104)

review controller

adding testing

fix lint issue

Co-authored-by: Joslyn Manzi Karenzi <[email protected]>

fix(stripe-payment): fix minor issue in stripe payment (#120)

-  add status check on the stripe response before setting order.paid to true

[Fixes #119]

* fix(create-review): fix failing create review function (#109)

-add validation before processing data

[Fixes #116]

* fix(create-review): fix failing create review function

-add validation before processing data

[Fixes #116]

Co-authored-by: Joslyn Manzi Karenzi <[email protected]>

Feature Manage WishList (#112)

* adde some file

added coverages

fix(review-swagger-docs): fix swagger documentation of thereview task (#114)

- add missing security tag in review docs

[Fixes #113]

adde some file

added some tests

added coverages

fix(review-swagger-docs): fix swagger documentation of thereview task (#114)

- add missing security tag in review docs

[Fixes #113]

adde some file

* fix(create-review): fix failing create review function

-add validation before processing data

[Fixes #116]

* fix(create-review): fix failing create review function

-add validation before processing data

[Fixes #116]

dockerizing project by creating containers for app & postgres (#110)

fix minor issue in deployment of render

latest commit

 Update Readme file to include Docker-specific information

 Update Readme file to include Docker-specific information

* fix(create-review): fix failing create review function

-add validation before processing data

[Fixes #116]

* fix(create-review): fix failing create review function

-add validation before processing data

[Fixes #116]

dockerizing project by creating containers for app & postgres (#110)

fix minor issue in deployment of render

latest commit

 Update Readme file to include Docker-specific information

 Update Readme file to include Docker-specific information

fix(review-swagger-docs): fix swagger documentation of thereview task (#114) (#115)

- add missing security tag in review docs

[Fixes #113]

update profile (#72) (#104)

review controller

adding testing

fix lint issue

update profile (#72) (#104)

review controller

adding testing

fix lint issue

Co-authored-by: Joslyn Manzi Karenzi <[email protected]>

fix(stripe-payment): fix minor issue in stripe payment (#120)

-  add status check on the stripe response before setting order.paid to true

[Fixes #119]

* inserted all changes

ft(back): establish PR

Feat: Product Lifecycle Notification System #84

ft(backend): establish listerning for carter
Feat: Product Lifecycle Notification System #84

ft(backend): establish listerning for carter
Feat: Product Lifecycle Notification System #84

ft(back): establish PR

Feat: Product Lifecycle Notification System #84

ft(backend): establish listerning for carter
Feat: Product Lifecycle Notification System #84

ft(back): establish PR

Feat: Product Lifecycle Notification System #84

ft(back): establish PR

Feat: Product Lifecycle Notification System #84

ft(backend): establish listerning for carter
Feat: Product Lifecycle Notification System #84

ft(backend):listern to order events
-listern to pressorder, change order status

Feat: Product Lifecycle Notification System #84

ft(backend): establish the nodemail
- to send email to vendor

Feat: Product Lifecycle Notification System #84

ft(back): establish all neccessart routes

Feat: Product Lifecycle Notification System #84

94 buyer should be able to pay via mtn mobile money (#118)

* pay with momo

Resolved test for Momo

added configuritions on lint files

* install typenode-fetch

added wishlist test

94 buyer should be able to pay via mtn mobile money (#118)

* pay with momo

Resolved test for Momo

added configuritions on lint files

* install typenode-fetch

added wishlist test

ft (backend): fix all error of linting

Feat: Product Lifecycle Notification System #84

ft(backend): fix the null vendor email

Feat: Product Lifecycle Notification System #84

ft(backend): fix the again the vendor email

Feat: Product Lifecycle Notification System #84

ft(backend): fix order cancelled event

Feat: Product Lifecycle Notification System #84

ft(backend): add routes docs
- write swagger doc for all related route of vendor notification

Feat: Product Lifecycle Notification System #84

fix(backend): make catch throw error

Feat: Product Lifecycle Notification System #84

fix(backend): remove all concole that was cousing lint worning

Feat: Product Lifecycle Notification System #84

ft(back): perform testing route

fix(backend): fix the delete notification by id

fix(backend): package json

* resolve rebase conflict

---------

Co-authored-by: Joslyn Manzi Karenzi <[email protected]>
  • Loading branch information
niyibi250 and jkarenzi authored Jun 17, 2024
1 parent 3f40153 commit 52a7f9e
Show file tree
Hide file tree
Showing 17 changed files with 1,262 additions and 533 deletions.
636 changes: 115 additions & 521 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"jest": "^29.7.0",
"joi": "^17.13.1",
"jsonwebtoken": "^9.0.2",
"mailgun-js": "^0.22.0",
"mailgun-js": "^0.6.7",
"morgan": "^1.10.0",
"node-fetch": "^2.6.7",
"nodemailer": "^6.9.13",
Expand Down Expand Up @@ -69,13 +69,15 @@
"coveragePathIgnorePatterns": [
"/node_modules/",
"/src/emails/",
"/src/utilis/"
"/src/utilis/",
"/src/Notification.vendor/"
],
"testPathIgnorePatterns": [
"/node_modules/",
"/src/emails/",
"/src/middlewares/",
"/src/utilis/"
"/src/utilis/",
"/src/Notification.vendor/"
]
},
"devDependencies": {
Expand All @@ -88,6 +90,7 @@
"@types/jsonwebtoken": "^9.0.6",
"@types/mailgun-js": "^0.22.18",
"@types/morgan": "^1.9.9",
"@types/node-cron": "^3.0.11",
"@types/node-fetch": "^2.6.11",
"@types/nodemailer": "^6.4.15",
"@types/passport": "^1.0.16",
Expand All @@ -103,6 +106,7 @@
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.1.3",
"jest": "^29.7.0",
"node-cron": "^3.0.3",
"prettier": "^3.2.5",
"ts-jest": "^29.1.2",
"ts-node-dev": "^2.0.0",
Expand Down
35 changes: 35 additions & 0 deletions src/Notification.vendor/EmailSendor.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import nodemailer from 'nodemailer';
import dotenv from 'dotenv';

dotenv.config();

async function sendEmail(vendorEmail: string, message_title: string, messageContent: string) {
try {
const transporter = nodemailer.createTransport({
service: 'gmail',
host: 'smtp.gmail.com',
port: 587,
secure: false,
auth: {
user: process.env.EMAIL_USER,
pass: process.env.EMAIL_PASS,
},
});

const mailOptions = {
from: `"The E-commerce Team" <${process.env.EMAIL_USER}>`,
to: vendorEmail,
subject: 'Notification from Your Company',
text: messageContent,
html: `<p>${messageContent.replace(/\n/g, '<br>')}</p>`,
};

await transporter.sendMail(mailOptions);

} catch (error) {
throw error
}
}

export default sendEmail;

Loading

0 comments on commit 52a7f9e

Please sign in to comment.