Add domestic vendor push infrastructure

This commit is contained in:
2026-07-26 01:45:59 +08:00
parent 7cca34b331
commit 0738953e6d
77 changed files with 6470 additions and 855 deletions
@@ -0,0 +1,43 @@
namespace MiaoJiZhang.Api.Contracts;
public record PushPreferencesResponse(bool System, bool Budget, bool Operations);
public record UpdatePushPreferencesRequest(bool System, bool Budget, bool Operations);
public record RegisterPushDeviceRequest(
string Provider,
string Token,
string PackageName,
string Flavor,
string AppVersion,
int VersionCode,
bool NotificationsAllowed);
public record PushDeviceRegistrationResponse(
long DeviceId,
string InstallationId,
string Provider,
bool Active,
string UnbindToken);
public record CreatePushCampaignRequest(
string Title,
string Body,
string Category,
string Action = "none",
string? EntityId = null,
string Flavor = "production",
string? Provider = null,
int? MinVersionCode = null,
int? MaxVersionCode = null,
long? TargetUserId = null,
int? TtlSeconds = null);
public record SchedulePushCampaignRequest(DateTime? ScheduledAt = null);
public record TestPushRequest(
long DeviceId,
string Title,
string Body,
string Category = "system",
string Action = "none",
string? EntityId = null);