mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-11-29 09:41:45 +00:00
More complete in-app-purchase PurchasedItem interface
This commit is contained in:
Vendored
+7
-1
@@ -26,6 +26,7 @@ export function validateOnce(service: Service, secretOrPubKey: any, receipt: Rec
|
||||
|
||||
export function isValidated(response: ValidationResponse): boolean;
|
||||
export function isExpired(item: PurchasedItem): boolean;
|
||||
export function isCanceled(item: PurchasedItem): boolean;
|
||||
export function getPurchaseData(purchaseData?: ValidationResponse, options?: {
|
||||
ignoreCanceled: boolean;
|
||||
ignoreExpired: boolean;
|
||||
@@ -94,10 +95,15 @@ export interface ValidationResponse {
|
||||
|
||||
export interface PurchasedItem {
|
||||
bundleId?: string; // only Apple
|
||||
appItemId?: string;
|
||||
orderId?: string; // only Google
|
||||
originalTransactionId?: string; // only Apple
|
||||
transactionId: string;
|
||||
productId: string;
|
||||
purchaseDate: number;
|
||||
originalPurchaseDate?: string; // only Apple
|
||||
purchaseDate: number | string;
|
||||
isTrial?: boolean; // only Apple
|
||||
cancellationDate?: number; // only Apple/Google
|
||||
// iTunes, windows and amazon subscription only
|
||||
// Google subscriptions only with google play store api info
|
||||
expirationDate?: number;
|
||||
|
||||
Reference in New Issue
Block a user