/**
 * JWSTransaction: the decoded StoreKit 2 transaction fields this gate cares
 * about. The full payload carries far more; we read only what the entitlement
 * decision needs.
 */
export interface JWSTransaction {
  bundleId?: string;
  productId?: string;
  /**
   * Stable across renewals and restores, so it is the identity everything
   * server-side keys on: the revocation record and the per-caller budget.
   */
  originalTransactionId?: string;
  /**
   * "Sandbox" or "Production". StoreKit 2 signs sandbox transactions with the
   * same certificate chain as production, and a sandbox Apple ID is free, so a
   * Production check is the only thing that stops anyone minting a valid
   * entitlement for nothing. The gate requires "Production".
   */
  environment?: "Sandbox" | "Production";
  /** Subscription expiry, ms since epoch. Absent for non-subscription products. */
  expiresDate?: number;
  /** Set (ms since epoch) when Apple revokes the purchase (refund, dispute). */
  revocationDate?: number;
}
