@loomcore/api 0.0.26 → 0.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,6 @@
1
+ import * as Mailjet from 'node-mailjet';
1
2
  export declare class EmailService {
2
3
  private mailjet;
3
4
  constructor();
4
- sendHtmlEmail(emailAddress: string, subject: string, body: string): Promise<any>;
5
+ sendHtmlEmail(emailAddress: string, subject: string, body: string): Promise<Mailjet.LibraryResponse<import("node-mailjet/declarations/request/Request.js").RequestData>>;
5
6
  }
@@ -1,10 +1,13 @@
1
- import { Client } from 'node-mailjet';
1
+ import * as Mailjet from 'node-mailjet';
2
2
  import { ServerError } from '../errors/index.js';
3
3
  import { config } from '../config/index.js';
4
4
  export class EmailService {
5
5
  mailjet;
6
6
  constructor() {
7
- this.mailjet = Client.apiConnect(config.email.emailApiKey || '', config.email.emailApiSecret || '');
7
+ this.mailjet = new Mailjet.default({
8
+ apiKey: config.email.emailApiKey || '',
9
+ apiSecret: config.email.emailApiSecret || ''
10
+ });
8
11
  }
9
12
  async sendHtmlEmail(emailAddress, subject, body) {
10
13
  const messageData = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loomcore/api",
3
- "version": "0.0.26",
3
+ "version": "0.0.27",
4
4
  "private": false,
5
5
  "description": "Loom Core Api - An opinionated Node.js api using Typescript, Express, and MongoDb",
6
6
  "scripts": {