Component evidence

OpenAI Referral Types (types/openaiReferrals.ts)

sub2api · frontend/src/types/openaiReferrals.ts · typescript · LGPL-3.0
paymentsintegrationaicrmdev-toolslang:typescript

Defines TypeScript data structures and interfaces for OpenAI referral eligibility and rewards management. Reuse when integrating OpenAI referral features into applications.

Source preview first 800 characters · full source over MCP
// Source: https://github.com/Wei-Shaw/sub2api | License: LGPL-3.0 | Modified files must remain under LGPL-3.0
// Modifications to this file must remain under LGPL-3.0.
// Provided via justclaw.it.com; keep this notice with the code.
export interface OpenAIReferralEligibility {
  should_show: boolean
  remaining_send_capacity: number | null
  remaining_reward_capacity: number | null
  requires_explicit_confirmation: boolean | null
  offer_id?: string
  title?: string
  description?: string
  rules?: string[]
  grants?: { grant_type: string; recipient: string; amount: number }[]
  program_id: string
  available_invites: number | null
  fetched_at: number
}

export interface OpenAIReferralRefreshResult {
  eligibility: OpenAIReferralEligibility | null
  cache_persisted: boolean
}

export int

... (truncated -- full source via MCP)