payload-plugin-newsletter 0.21.0 → 0.21.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
1
+ ## [0.21.2] - 2025-08-06
2
+
3
+ ### Fixed
4
+ - Fixed webhook endpoint paths to include `/newsletter` prefix for proper API routing
5
+ - Changed `/webhooks/broadcast` to `/newsletter/webhooks/broadcast`
6
+ - Changed `/webhooks/verify` to `/newsletter/webhooks/verify`
7
+ - This ensures webhooks work correctly with Payload's API routing
8
+
9
+ ## [0.21.1] - 2025-08-06
10
+
11
+ ### Fixed
12
+ - Fixed TypeScript and ESLint errors in webhook implementation
13
+ - Removed unused import (BroadcastQueueingEvent)
14
+ - Fixed unused parameter warnings with underscore prefix
15
+ - Added block scopes to switch cases for ESLint compliance
16
+ - Fixed unused error variable in catch blocks
17
+
1
18
  ## [0.21.0] - 2025-01-31
2
19
 
3
20
  ### Added
package/dist/admin.js CHANGED
@@ -218,7 +218,7 @@ var WebhookConfiguration = () => {
218
218
  } else {
219
219
  toast.error(data.error || "Verification failed");
220
220
  }
221
- } catch (error) {
221
+ } catch {
222
222
  toast.error("Failed to verify webhook");
223
223
  } finally {
224
224
  setVerifying(false);
package/dist/server.js CHANGED
@@ -2725,7 +2725,7 @@ async function routeWebhookEvent(event, req, config) {
2725
2725
  // src/endpoints/webhooks/broadcast.ts
2726
2726
  var createBroadcastWebhookEndpoint = (config) => {
2727
2727
  return {
2728
- path: "/webhooks/broadcast",
2728
+ path: "/newsletter/webhooks/broadcast",
2729
2729
  method: "post",
2730
2730
  handler: async (req) => {
2731
2731
  try {
@@ -2791,7 +2791,7 @@ var createBroadcastWebhookEndpoint = (config) => {
2791
2791
  // src/endpoints/webhooks/verify.ts
2792
2792
  var createWebhookVerifyEndpoint = (config) => {
2793
2793
  return {
2794
- path: "/webhooks/verify",
2794
+ path: "/newsletter/webhooks/verify",
2795
2795
  method: "post",
2796
2796
  handler: async (req) => {
2797
2797
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payload-plugin-newsletter",
3
- "version": "0.21.0",
3
+ "version": "0.21.2",
4
4
  "description": "Complete newsletter management plugin for Payload CMS with subscriber management, magic link authentication, and email service integration",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",