@revenuecat/purchases-typescript-internal-esm 13.12.0 → 13.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/webRedemption.d.ts +56 -0
- package/dist/webRedemption.js +27 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { CustomerInfo } from "./customerInfo";
|
|
2
|
+
import { PurchasesError } from "./errors";
|
|
3
|
+
/**
|
|
4
|
+
* An object containing the redemption link to be redeemed.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export type WebPurchaseRedemption = {
|
|
8
|
+
/**
|
|
9
|
+
* The redemption link to be redeemed.
|
|
10
|
+
*/
|
|
11
|
+
redemptionLink: string;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* The result type of a Redemption Link redemption attempt.
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
export declare enum WebPurchaseRedemptionResultType {
|
|
18
|
+
/**
|
|
19
|
+
* The redemption was successful.
|
|
20
|
+
*/
|
|
21
|
+
SUCCESS = "SUCCESS",
|
|
22
|
+
/**
|
|
23
|
+
* The redemption failed.
|
|
24
|
+
*/
|
|
25
|
+
ERROR = "ERROR",
|
|
26
|
+
/**
|
|
27
|
+
* The purchase associated to the link belongs to another user.
|
|
28
|
+
*/
|
|
29
|
+
PURCHASE_BELONGS_TO_OTHER_USER = "PURCHASE_BELONGS_TO_OTHER_USER",
|
|
30
|
+
/**
|
|
31
|
+
* The token is invalid.
|
|
32
|
+
*/
|
|
33
|
+
INVALID_TOKEN = "INVALID_TOKEN",
|
|
34
|
+
/**
|
|
35
|
+
* The token has expired. A new Redemption Link will be sent to the email used during purchase.
|
|
36
|
+
*/
|
|
37
|
+
EXPIRED = "EXPIRED"
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The result of a redemption attempt.
|
|
41
|
+
* @public
|
|
42
|
+
*/
|
|
43
|
+
export type WebPurchaseRedemptionResult = {
|
|
44
|
+
result: WebPurchaseRedemptionResultType.SUCCESS;
|
|
45
|
+
customerInfo: CustomerInfo;
|
|
46
|
+
} | {
|
|
47
|
+
result: WebPurchaseRedemptionResultType.ERROR;
|
|
48
|
+
error: PurchasesError;
|
|
49
|
+
} | {
|
|
50
|
+
result: WebPurchaseRedemptionResultType.PURCHASE_BELONGS_TO_OTHER_USER;
|
|
51
|
+
} | {
|
|
52
|
+
result: WebPurchaseRedemptionResultType.INVALID_TOKEN;
|
|
53
|
+
} | {
|
|
54
|
+
result: WebPurchaseRedemptionResultType.EXPIRED;
|
|
55
|
+
obfuscatedEmail: string;
|
|
56
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The result type of a Redemption Link redemption attempt.
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
export var WebPurchaseRedemptionResultType;
|
|
6
|
+
(function (WebPurchaseRedemptionResultType) {
|
|
7
|
+
/**
|
|
8
|
+
* The redemption was successful.
|
|
9
|
+
*/
|
|
10
|
+
WebPurchaseRedemptionResultType["SUCCESS"] = "SUCCESS";
|
|
11
|
+
/**
|
|
12
|
+
* The redemption failed.
|
|
13
|
+
*/
|
|
14
|
+
WebPurchaseRedemptionResultType["ERROR"] = "ERROR";
|
|
15
|
+
/**
|
|
16
|
+
* The purchase associated to the link belongs to another user.
|
|
17
|
+
*/
|
|
18
|
+
WebPurchaseRedemptionResultType["PURCHASE_BELONGS_TO_OTHER_USER"] = "PURCHASE_BELONGS_TO_OTHER_USER";
|
|
19
|
+
/**
|
|
20
|
+
* The token is invalid.
|
|
21
|
+
*/
|
|
22
|
+
WebPurchaseRedemptionResultType["INVALID_TOKEN"] = "INVALID_TOKEN";
|
|
23
|
+
/**
|
|
24
|
+
* The token has expired. A new Redemption Link will be sent to the email used during purchase.
|
|
25
|
+
*/
|
|
26
|
+
WebPurchaseRedemptionResultType["EXPIRED"] = "EXPIRED";
|
|
27
|
+
})(WebPurchaseRedemptionResultType || (WebPurchaseRedemptionResultType = {}));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@revenuecat/purchases-typescript-internal-esm",
|
|
3
3
|
"title": "Purchases typescript internal shared code",
|
|
4
|
-
"version": "13.
|
|
4
|
+
"version": "13.13.0",
|
|
5
5
|
"description": "Typescript code to be used by RevenueCat's hybrid SDKs. Not meant for external usage.",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|