Skip to content

Send files directly between devices over the internet - no cloud storage, no size limits.

396 B
Raw Blame
import type { BillingPlan, PlanOffer } from '../core'

export type PurchaseOutcome = 'bought' | 'owned' | 'pending' | 'cancelled'

export interface PurchaseAdapter {
  available(): Promise<boolean>
  offers(): Promise<PlanOffer[]>
  managementUrl(): Promise<string | null>
  identify(code: string): Promise<void>
  buy(plan: BillingPlan): Promise<PurchaseOutcome>
  restore(): Promise<boolean>
}