Archived
Type registrations, email and WhatsApp messaging pages
Adds typed payloads and results for the email/WhatsApp attendee and broadcast endpoints. The WhatsApp page's messageDirty flag becomes a ref (it only gated the template effect), and a no-op branch in the email template effect is removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -257,8 +257,11 @@ export type RegistrationOption = {
|
||||
quantity: number;
|
||||
variantId?: string | null;
|
||||
priceSnapshot?: number | null;
|
||||
appliedTierId?: string | null;
|
||||
eventOption?: EventOption;
|
||||
variant?: OptionVariant | null;
|
||||
// One entry per price the line was bought at (e.g. some before an early-bird tier expired).
|
||||
tranches?: { id: string; quantity: number; priceSnapshot: number; appliedTierId?: string | null }[];
|
||||
};
|
||||
|
||||
// A named person on a group registration, for one main-ticket place.
|
||||
@@ -270,8 +273,8 @@ export type Attendee = {
|
||||
consentRequests?: { id: string; status: "pending" | "given" | "declined" }[];
|
||||
};
|
||||
|
||||
export type FormAnswer = { id: string; responseId?: string; fieldId: string; value: string };
|
||||
export type FormResponse = { id: string; registrationId?: string; attendeeId?: string | null; createdAt?: string; answers?: FormAnswer[] };
|
||||
export type FormAnswer = { id: string; responseId?: string; fieldId: string; value: string; field?: { label: string } | null };
|
||||
export type FormResponse = { id: string; registrationId?: string; attendeeId?: string | null; createdAt: string; answers?: FormAnswer[] };
|
||||
|
||||
export type Registration = {
|
||||
id: string;
|
||||
@@ -280,7 +283,7 @@ export type Registration = {
|
||||
status: RegistrationStatus;
|
||||
discountTotal?: number;
|
||||
ticketDelivery?: "payer" | "each";
|
||||
createdAt?: string;
|
||||
createdAt: string;
|
||||
updatedAt?: string;
|
||||
user?: UserSummary;
|
||||
event?: Event;
|
||||
@@ -303,7 +306,7 @@ export type Ticket = {
|
||||
emailSent?: boolean;
|
||||
attendeeId?: string | null;
|
||||
holderUserId?: string | null;
|
||||
createdAt?: string;
|
||||
createdAt: string;
|
||||
updatedAt?: string;
|
||||
user?: UserSummary;
|
||||
attendee?: { id: string; name: string; email?: string | null; phone?: string | null } | null;
|
||||
@@ -325,7 +328,7 @@ export type Payment = {
|
||||
status?: string | null;
|
||||
externalId?: string | null;
|
||||
originalPaymentId?: string | null;
|
||||
createdAt?: string;
|
||||
createdAt: string;
|
||||
user?: UserSummary;
|
||||
recordedBy?: UserSummary | null;
|
||||
event?: Pick<Event, "id" | "title"> | null;
|
||||
@@ -376,6 +379,15 @@ export type DashboardStats = {
|
||||
activeEventsCount: number;
|
||||
};
|
||||
|
||||
// What the email/WhatsApp send, preview and schedule endpoints return.
|
||||
export type MessageSendResult<Recipient = { phone: string; name?: string }> = {
|
||||
matched?: number;
|
||||
queued?: number;
|
||||
sent?: number;
|
||||
recipients?: Recipient[];
|
||||
job?: { id: string };
|
||||
};
|
||||
|
||||
// A scanning section (e.g. "Main hall") and the ticket options valid at it.
|
||||
export type Section = {
|
||||
id: string;
|
||||
|
||||
Reference in New Issue
Block a user