- Created migration file for rebaseline of the database schema. - Added tables: auth_clients, tenants, auth_client_keys, webhook_nonces, events_inbox, lists, campaigns, subscriptions, send_jobs, delivery_summary, and send_batches. - Defined relationships and constraints between tables. - Updated DbContext and model snapshot to reflect new entities and their configurations. - Removed deprecated ListMember entity and its references. - Introduced Dockerfile for building and running the SendEngine application. - Enhanced installer program to support tenant creation and webhook client management with Member Center integration.
88 lines
2.2 KiB
C#
88 lines
2.2 KiB
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace SendEngine.Api.Models;
|
|
|
|
public sealed class SubscriptionEventRequest
|
|
{
|
|
[JsonPropertyName("event_id")]
|
|
public Guid EventId { get; set; }
|
|
|
|
[JsonPropertyName("event_type")]
|
|
public string EventType { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("tenant_id")]
|
|
public Guid TenantId { get; set; }
|
|
|
|
[JsonPropertyName("list_id")]
|
|
public Guid ListId { get; set; }
|
|
|
|
[JsonPropertyName("subscriber")]
|
|
public SubscriberPayload Subscriber { get; set; } = new();
|
|
|
|
[JsonPropertyName("occurred_at")]
|
|
public DateTimeOffset OccurredAt { get; set; }
|
|
}
|
|
|
|
public sealed class SubscriberPayload
|
|
{
|
|
[JsonPropertyName("id")]
|
|
public Guid Id { get; set; }
|
|
|
|
[JsonPropertyName("email")]
|
|
public string Email { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("status")]
|
|
public string Status { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("preferences")]
|
|
public Dictionary<string, object>? Preferences { get; set; }
|
|
}
|
|
|
|
public sealed class FullSyncBatchRequest
|
|
{
|
|
[JsonPropertyName("sync_id")]
|
|
public Guid SyncId { get; set; }
|
|
|
|
[JsonPropertyName("batch_no")]
|
|
public int BatchNo { get; set; }
|
|
|
|
[JsonPropertyName("batch_total")]
|
|
public int BatchTotal { get; set; }
|
|
|
|
[JsonPropertyName("tenant_id")]
|
|
public Guid TenantId { get; set; }
|
|
|
|
[JsonPropertyName("list_id")]
|
|
public Guid ListId { get; set; }
|
|
|
|
[JsonPropertyName("subscribers")]
|
|
public List<SubscriberPayload> Subscribers { get; set; } = new();
|
|
|
|
[JsonPropertyName("occurred_at")]
|
|
public DateTimeOffset OccurredAt { get; set; }
|
|
}
|
|
|
|
public sealed class SesEventRequest
|
|
{
|
|
[JsonPropertyName("event_type")]
|
|
public string EventType { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("message_id")]
|
|
public string MessageId { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("tenant_id")]
|
|
public Guid TenantId { get; set; }
|
|
|
|
[JsonPropertyName("email")]
|
|
public string Email { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("bounce_type")]
|
|
public string? BounceType { get; set; }
|
|
|
|
[JsonPropertyName("occurred_at")]
|
|
public DateTimeOffset OccurredAt { get; set; }
|
|
|
|
[JsonPropertyName("tags")]
|
|
public Dictionary<string, string>? Tags { get; set; }
|
|
}
|