Skip to content

Commit

Permalink
Add PAYWALL_RESULT to typescript enums (#634)
Browse files Browse the repository at this point in the history
This will be used by the `presentPaywall`/`presentPaywallIfNeeded`
methods.
  • Loading branch information
tonidero authored Jan 8, 2024
1 parent ec57a9d commit bead1f4
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions typescript/src/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,34 @@ export enum VERIFICATION_RESULT {
*/
VERIFIED_ON_DEVICE = "VERIFIED_ON_DEVICE",
}

/**
* The result of presenting a paywall. This will be the last situation the user experienced before the
* paywall closed.
*/
export enum PAYWALL_RESULT {
/**
* If the paywall wasn't presented. Only returned when using "presentPaywallIfNeeded"
*/
NOT_PRESENTED = "NOT_PRESENTED",

/**
* If an error happened during purchase/restoration.
*/
ERROR = "ERROR",

/**
* If the paywall was closed without performing an operation
*/
CANCELLED = "CANCELLED",

/**
* If a successful purchase happened inside the paywall
*/
PURCHASED = "PURCHASED",

/**
* If a successful restore happened inside the paywall
*/
RESTORED = "RESTORED",
}

0 comments on commit bead1f4

Please sign in to comment.