Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(EMS-4155): apim notify integration #3507

Open
wants to merge 11 commits into
base: main-broker-address-lookup
Choose a base branch
from

Conversation

ttbarnes
Copy link
Contributor

Introduction ✏️

  • APIM has been updated so that file buffers can be sent to Notify.
  • EXIPS can therefore now call APIM to send emails, instead of calling Notify directly.

Resolution ✔️

  • Create new sendEmail APIM integration function.
  • Update relevant helper functions.
  • Remove notifications-node-client NPM dependency.
  • Create new types.

Miscellaneous ➕

  • Various documentation improvements.
  • Improve some API error handling unit tests.

@ttbarnes ttbarnes added documentation Improvements or additions to documentation tech Technical debt/improvements chore Chore labels Jan 28, 2025
@ttbarnes ttbarnes self-assigned this Jan 28, 2025
},
});

if (response.data && response.status === 201) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for the confusion, I meant it will be wise to do following to keep the code DRY?

const isValidResponse = response.data && validateStatus(response.status);

if(isValidResponse) {...

The function is Axios call can be centralised.

 const validateStatus = (status) => {
          const acceptableStatus = [201];
          return acceptableStatus.includes(status);
        },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Chore documentation Improvements or additions to documentation tech Technical debt/improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants