payload-plugin-newsletter 0.20.7 → 0.21.0

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.
@@ -2141,6 +2141,14 @@ var createBroadcastsCollection = (pluginConfig) => {
2141
2141
  condition: (data) => hasProviders && data?.providerId
2142
2142
  }
2143
2143
  },
2144
+ {
2145
+ name: "externalId",
2146
+ type: "text",
2147
+ admin: {
2148
+ readOnly: true,
2149
+ description: "External ID for webhook integration"
2150
+ }
2151
+ },
2144
2152
  {
2145
2153
  name: "providerData",
2146
2154
  type: "json",
@@ -2149,6 +2157,77 @@ var createBroadcastsCollection = (pluginConfig) => {
2149
2157
  condition: () => false
2150
2158
  // Hidden by default
2151
2159
  }
2160
+ },
2161
+ // Webhook tracking fields
2162
+ {
2163
+ name: "webhookData",
2164
+ type: "group",
2165
+ label: "Webhook Data",
2166
+ admin: {
2167
+ condition: () => false
2168
+ // Hidden by default, used for webhook tracking
2169
+ },
2170
+ fields: [
2171
+ {
2172
+ name: "lastWebhookEvent",
2173
+ type: "text",
2174
+ admin: {
2175
+ readOnly: true
2176
+ }
2177
+ },
2178
+ {
2179
+ name: "lastWebhookEventAt",
2180
+ type: "date",
2181
+ admin: {
2182
+ readOnly: true
2183
+ }
2184
+ },
2185
+ {
2186
+ name: "hasWarnings",
2187
+ type: "checkbox",
2188
+ defaultValue: false
2189
+ },
2190
+ {
2191
+ name: "failureReason",
2192
+ type: "text"
2193
+ },
2194
+ {
2195
+ name: "sentCount",
2196
+ type: "number"
2197
+ },
2198
+ {
2199
+ name: "totalCount",
2200
+ type: "number"
2201
+ },
2202
+ {
2203
+ name: "failedCount",
2204
+ type: "number"
2205
+ },
2206
+ {
2207
+ name: "remainingCount",
2208
+ type: "number"
2209
+ },
2210
+ {
2211
+ name: "sendingStartedAt",
2212
+ type: "date"
2213
+ },
2214
+ {
2215
+ name: "failedAt",
2216
+ type: "date"
2217
+ },
2218
+ {
2219
+ name: "abortedAt",
2220
+ type: "date"
2221
+ },
2222
+ {
2223
+ name: "abortReason",
2224
+ type: "text"
2225
+ },
2226
+ {
2227
+ name: "pausedAt",
2228
+ type: "date"
2229
+ }
2230
+ ]
2152
2231
  }
2153
2232
  ],
2154
2233
  hooks: {
@@ -2808,6 +2887,15 @@ var createSubscribersCollection = (pluginConfig) => {
2808
2887
  type: "date",
2809
2888
  hidden: true
2810
2889
  },
2890
+ // External ID for webhook integration
2891
+ {
2892
+ name: "externalId",
2893
+ type: "text",
2894
+ admin: {
2895
+ description: "ID from email service provider",
2896
+ readOnly: true
2897
+ }
2898
+ },
2811
2899
  // Subscription status
2812
2900
  {
2813
2901
  name: "subscriptionStatus",
@@ -2823,6 +2911,14 @@ var createSubscribersCollection = (pluginConfig) => {
2823
2911
  description: "Current subscription status"
2824
2912
  }
2825
2913
  },
2914
+ {
2915
+ name: "subscribedAt",
2916
+ type: "date",
2917
+ admin: {
2918
+ description: "When the user subscribed",
2919
+ readOnly: true
2920
+ }
2921
+ },
2826
2922
  {
2827
2923
  name: "unsubscribedAt",
2828
2924
  type: "date",
@@ -2832,6 +2928,15 @@ var createSubscribersCollection = (pluginConfig) => {
2832
2928
  readOnly: true
2833
2929
  }
2834
2930
  },
2931
+ {
2932
+ name: "unsubscribeReason",
2933
+ type: "text",
2934
+ admin: {
2935
+ condition: (data) => data?.subscriptionStatus === "unsubscribed",
2936
+ description: "Reason for unsubscribing",
2937
+ readOnly: true
2938
+ }
2939
+ },
2835
2940
  // Email preferences
2836
2941
  {
2837
2942
  name: "emailPreferences",