plenna_utilities 1.5.0 → 1.5.2

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,5 @@
1
1
  export declare class AirTable {
2
2
  private readonly webhook;
3
3
  constructor(webhook: string);
4
- sendToAirTable(payload: Record<string, string>): Promise<boolean>;
4
+ sendToAirTable(payload: Record<string, unknown>): Promise<boolean>;
5
5
  }
@@ -8,7 +8,7 @@ class Mailer {
8
8
  }
9
9
  async sendEmail(templateId, destiny, params) {
10
10
  try {
11
- await fetch('https://api.sendinblue.com/v3/smtp/email', {
11
+ const response = await fetch('https://api.sendinblue.com/v3/smtp/email', {
12
12
  method: 'post',
13
13
  headers: {
14
14
  accept: 'application/json',
@@ -21,9 +21,11 @@ class Mailer {
21
21
  templateId
22
22
  })
23
23
  });
24
+ console.log(JSON.stringify(response));
24
25
  return true;
25
26
  }
26
27
  catch (error) {
28
+ console.log(JSON.stringify(error));
27
29
  console.log('error sending email');
28
30
  return false;
29
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plenna_utilities",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "description": "plenna's utils for backend projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",