Skip to content

Commit

Permalink
Add extra API docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tvanlaerhoven committed Dec 19, 2024
1 parent 0c63a5d commit 19ba90f
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions engage/src/api/entities/Subscription.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
import { Entity, EntityType } from '@theoplayer/react-native-engage';

export enum SubscriptionType {
/**
* The user has an unspecified subscription type.
*/
Unspecified = 0,

/**
* The user has a paid subscription currently active.
*/
Active = 1,

/**
* The user has a trial subscription.
*/
ActiveTrial = 2,

/**
* The user has an account but no active subscription or trial.
*/
Inactive = 3,
}

Expand Down Expand Up @@ -47,17 +62,19 @@ export interface Subscription extends Entity {
type: EntityType.Subscription;

/**
* providerPackageName
* The package name of the app that handles the subscription.
*
* @example "com.google.android.youtube".
*/
providerPackageName: string;

/**
* subscriptionType
* The type of subscription.
*/
subscriptionType: SubscriptionType;

/**
* The optional subscription's expiration time in milliseconds.
* The optional subscription's expiration time in milliseconds since epoch.
*/
expirationTime?: number;

Expand Down

0 comments on commit 19ba90f

Please sign in to comment.