-
Notifications
You must be signed in to change notification settings - Fork 32
/
index.d.ts
47 lines (40 loc) · 973 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
export interface Options {
email: string;
key: string;
}
export interface Receipt {
packageName: string;
productId: string;
purchaseToken: string;
}
export interface SubscriptionReceipt extends Receipt {
developerPayload: any;
}
export interface Response {
isSuccessful: boolean;
errorMessage: any;
payload: any;
}
export interface VerificationResponse {
isSuccessful: boolean;
errorMessage: null | string;
payload: InAppPurchasePayloadResponse;
}
export interface InAppPurchasePayloadResponse {
kind: "androidpublisher#productPurchase";
purchaseTimeMillis: number;
acknowledgementState: number;
purchaseState: number;
consumptionState: number;
developerPayload: number;
orderId: string;
purchaseType: number;
}
export interface IVerifier {
verifyINAPP(receipt: Receipt): Promise<any>;
verifySub(receipt: Receipt): Promise<any>;
}
declare const Verifier: {
new (options: Options): IVerifier;
};
export default Verifier;