many fixes and improvements - rework for modules/ and common/

feat(emailer): add Postmark and Resend providers
This commit is contained in:
2025-06-06 12:21:43 -04:00
parent 31ba18fa8d
commit 25b94d3e02
313 changed files with 6586 additions and 18260 deletions

View File

@@ -0,0 +1,6 @@
namespace Hutopy.Modules.Memberships.Contracts;
public interface IMembershipCancellationProcessor
{
Task<DateTimeOffset?> CancelAsync(string subscriptionId, CancellationToken ct = default);
}

View File

@@ -0,0 +1,26 @@
namespace Hutopy.Modules.Memberships.Contracts;
public interface IMembershipNotifier
{
Task NotifyCheckoutSessionCompleted(string stripeSessionId, string stripeSubscriptionId,
string userId,
string creatorId,
string tierId,
CancellationToken cancellationToken = default);
Task NotifyPaymentSucceedAsync(
string stripeSubscriptionId,
string hostedInvoiceUrl,
decimal amount,
string currency,
CancellationToken cancellationToken = default);
Task NotifySubscriptionUpdatedAsync(
string subscriptionId,
DateTimeOffset? endDate,
CancellationToken cancellationToken = default);
Task NotifySubscriptionDeletedAsync(
string subscriptionId,
CancellationToken cancellationToken = default);
}

View File

@@ -0,0 +1,14 @@
using Hutopy.Modules.Creators.Contracts;
namespace Hutopy.Modules.Memberships.Contracts;
public interface IMembershipPaymentProcessor
{
Task<MembershipCheckoutSession> CreateCheckoutSessionAsync(
Guid userId,
CreatorReference creatorReference,
Guid tierId,
string priceId,
string successUrl,
string cancelUrl);
}

View File

@@ -0,0 +1,11 @@
namespace Hutopy.Modules.Memberships.Contracts;
public interface IMembershipTierProcessor
{
Task<string> CreateAsync(
Guid creatorId,
Guid tierId,
string productName,
string currencyCode,
decimal amount);
}

View File

@@ -0,0 +1,6 @@
namespace Hutopy.Modules.Memberships.Contracts;
[PublicAPI]
public record MembershipCheckoutSession(
string Id,
string Url);