n8n-nodes-posthawk 0.1.0 → 0.1.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.
@@ -35,7 +35,7 @@ class PosthawkApi {
35
35
  this.test = {
36
36
  request: {
37
37
  baseURL: '={{$credentials.baseUrl}}',
38
- url: '/v1/emails/queue/stats',
38
+ url: '/v1/queue/stats',
39
39
  method: 'GET',
40
40
  },
41
41
  };
@@ -442,7 +442,7 @@ class Posthawk {
442
442
  body.metadata = JSON.parse(additional.metadata);
443
443
  responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'posthawkApi', {
444
444
  method: 'POST',
445
- url: `${baseUrl}/v1/emails/send`,
445
+ url: `${baseUrl}/v1/send`,
446
446
  body,
447
447
  json: true,
448
448
  });
@@ -451,7 +451,7 @@ class Posthawk {
451
451
  const emails = JSON.parse(this.getNodeParameter('emails', i));
452
452
  responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'posthawkApi', {
453
453
  method: 'POST',
454
- url: `${baseUrl}/v1/emails/batch`,
454
+ url: `${baseUrl}/v1/batch`,
455
455
  body: { emails },
456
456
  json: true,
457
457
  });
@@ -460,7 +460,7 @@ class Posthawk {
460
460
  const jobId = this.getNodeParameter('jobId', i);
461
461
  responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'posthawkApi', {
462
462
  method: 'GET',
463
- url: `${baseUrl}/v1/emails/send/${jobId}`,
463
+ url: `${baseUrl}/v1/send/${jobId}`,
464
464
  json: true,
465
465
  });
466
466
  }
@@ -470,7 +470,7 @@ class Posthawk {
470
470
  if (operation === 'list') {
471
471
  responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'posthawkApi', {
472
472
  method: 'GET',
473
- url: `${baseUrl}/v1/scheduled`,
473
+ url: `${baseUrl}/scheduled`,
474
474
  json: true,
475
475
  });
476
476
  }
@@ -478,7 +478,7 @@ class Posthawk {
478
478
  const id = this.getNodeParameter('scheduledId', i);
479
479
  responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'posthawkApi', {
480
480
  method: 'GET',
481
- url: `${baseUrl}/v1/scheduled/${id}`,
481
+ url: `${baseUrl}/scheduled/${id}`,
482
482
  json: true,
483
483
  });
484
484
  }
@@ -486,7 +486,7 @@ class Posthawk {
486
486
  const id = this.getNodeParameter('scheduledId', i);
487
487
  responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'posthawkApi', {
488
488
  method: 'DELETE',
489
- url: `${baseUrl}/v1/scheduled/${id}`,
489
+ url: `${baseUrl}/scheduled/${id}`,
490
490
  json: true,
491
491
  });
492
492
  }
@@ -494,7 +494,7 @@ class Posthawk {
494
494
  const id = this.getNodeParameter('scheduledId', i);
495
495
  responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'posthawkApi', {
496
496
  method: 'PATCH',
497
- url: `${baseUrl}/v1/scheduled/${id}/reschedule`,
497
+ url: `${baseUrl}/scheduled/${id}/reschedule`,
498
498
  body: { scheduledFor: this.getNodeParameter('scheduledFor', i) },
499
499
  json: true,
500
500
  });
@@ -505,7 +505,7 @@ class Posthawk {
505
505
  if (operation === 'list') {
506
506
  responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'posthawkApi', {
507
507
  method: 'GET',
508
- url: `${baseUrl}/v1/emails/contacts`,
508
+ url: `${baseUrl}/v1/contacts`,
509
509
  json: true,
510
510
  });
511
511
  }
@@ -513,7 +513,7 @@ class Posthawk {
513
513
  const id = this.getNodeParameter('contactId', i);
514
514
  responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'posthawkApi', {
515
515
  method: 'GET',
516
- url: `${baseUrl}/v1/emails/contacts/${id}`,
516
+ url: `${baseUrl}/v1/contacts/${id}`,
517
517
  json: true,
518
518
  });
519
519
  }
@@ -530,7 +530,7 @@ class Posthawk {
530
530
  body.metadata = JSON.parse(fields.metadata);
531
531
  responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'posthawkApi', {
532
532
  method: 'POST',
533
- url: `${baseUrl}/v1/emails/contacts`,
533
+ url: `${baseUrl}/v1/contacts`,
534
534
  body,
535
535
  json: true,
536
536
  });
@@ -547,7 +547,7 @@ class Posthawk {
547
547
  body.metadata = JSON.parse(fields.metadata);
548
548
  responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'posthawkApi', {
549
549
  method: 'PATCH',
550
- url: `${baseUrl}/v1/emails/contacts/${id}`,
550
+ url: `${baseUrl}/v1/contacts/${id}`,
551
551
  body,
552
552
  json: true,
553
553
  });
@@ -556,7 +556,7 @@ class Posthawk {
556
556
  const id = this.getNodeParameter('contactId', i);
557
557
  responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'posthawkApi', {
558
558
  method: 'DELETE',
559
- url: `${baseUrl}/v1/emails/contacts/${id}`,
559
+ url: `${baseUrl}/v1/contacts/${id}`,
560
560
  json: true,
561
561
  });
562
562
  }
@@ -566,14 +566,14 @@ class Posthawk {
566
566
  if (operation === 'list') {
567
567
  responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'posthawkApi', {
568
568
  method: 'GET',
569
- url: `${baseUrl}/v1/emails/suppressions`,
569
+ url: `${baseUrl}/v1/suppressions`,
570
570
  json: true,
571
571
  });
572
572
  }
573
573
  else if (operation === 'add') {
574
574
  responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'posthawkApi', {
575
575
  method: 'POST',
576
- url: `${baseUrl}/v1/emails/suppressions`,
576
+ url: `${baseUrl}/v1/suppressions`,
577
577
  body: {
578
578
  email: this.getNodeParameter('email', i),
579
579
  reason: this.getNodeParameter('reason', i),
@@ -585,7 +585,7 @@ class Posthawk {
585
585
  const id = this.getNodeParameter('suppressionId', i);
586
586
  responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'posthawkApi', {
587
587
  method: 'DELETE',
588
- url: `${baseUrl}/v1/emails/suppressions/${id}`,
588
+ url: `${baseUrl}/v1/suppressions/${id}`,
589
589
  json: true,
590
590
  });
591
591
  }
@@ -1,4 +1,10 @@
1
- <svg width="60" height="60" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg">
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60">
2
2
  <rect width="60" height="60" rx="8" fill="#8262ff"/>
3
- <path d="M30 14L18 26h8v8l-8 8h24l-8-8v-8h8L30 14z" fill="white" fill-opacity="0.9"/>
3
+ <g transform="translate(12 10) scale(0.27)">
4
+ <polygon fill="#fff" points="94.8 74.21 101.21 43.57 81.19 26.79 48 53.21 9.79 114.92 94.8 74.21"/>
5
+ <polygon fill="#fff" points="59.68 98.64 50.54 114.93 67.46 110.81 59.68 98.64"/>
6
+ <polygon fill="#fff" points="95.4 134.96 85.66 117.77 85.7 117.66 93.52 80.3 63.12 94.86 72.53 109.57 72.54 109.57 88.77 134.96 75.42 134.96 69.29 141.09 112.87 141.09 106.74 134.96 95.4 134.96"/>
7
+ <path fill="#fff" d="M127.31,13.06l-2.31-5.67L102.58,0l1.02,4.16-18.78,19.22,21.83,18.3-10.46,49.93,19.76-26.21,2.77-25.91-3.54-10.89,4-7.51c.2.07,8.97,1.58,8.97,1.58l.86,3.76,3.82-6.59-5.54-6.79Z"/>
8
+ <polygon fill="#fff" points="53.56 99.43 24.22 113.49 0 151.81 29.73 141.94 53.56 99.43"/>
9
+ </g>
4
10
  </svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-posthawk",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "n8n node for Posthawk — send, schedule, and manage emails via the Posthawk API",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",