Invitations with a package; promo codes fill up the balance
An admin can pick a package when inviting: each invitee gets a promo code (in the e-mail and its preview, kept on resend), redeemed by itself at sign up; revoking the invitation withdraws it, and the list shows the package. Redeeming a promo code now fills the units up to the package's amounts: used units come back, more than that stays. A code that would add nothing stays open, with a message saying so; the answer tells what was added. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -413,6 +413,8 @@ export interface AdminInvitation {
|
||||
mail: "sent" | "queued" | "failed" | "archived";
|
||||
mail_error: string | null;
|
||||
can_resend: boolean;
|
||||
/** The package it comes with (a promo code, redeemed at sign-up). */
|
||||
package: { id: string; name: string | null; code: string | null; redeemed_at: string | null } | null;
|
||||
}
|
||||
|
||||
export interface WaitlistEntry {
|
||||
@@ -428,6 +430,8 @@ export interface InvitationResult {
|
||||
status: "invited" | "invalid" | "already_user" | "already_invited" | "opted_out";
|
||||
id?: string;
|
||||
url?: string;
|
||||
/** The promo code of the package sent with it. */
|
||||
promo_code?: string | null;
|
||||
}
|
||||
|
||||
/** A calculated year in a list (`GET /v1/charts/{id}/forecasts`). */
|
||||
|
||||
Reference in New Issue
Block a user