@revenuecat/purchases-typescript-internal-esm 12.0.0 → 13.0.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/enums.d.ts +38 -1
- package/dist/enums.js +5 -5
- package/dist/purchasesConfiguration.d.ts +8 -12
- package/package.json +1 -1
package/dist/enums.d.ts
CHANGED
|
@@ -196,7 +196,7 @@ export declare enum STOREKIT_VERSION {
|
|
|
196
196
|
* Modes for completing the purchase process.
|
|
197
197
|
* @public
|
|
198
198
|
*/
|
|
199
|
-
export declare enum
|
|
199
|
+
export declare enum PURCHASES_ARE_COMPLETED_BY_TYPE {
|
|
200
200
|
/**
|
|
201
201
|
* RevenueCat will **not** automatically acknowledge any purchases. You will have to do so manually.
|
|
202
202
|
*
|
|
@@ -211,3 +211,40 @@ export declare enum PURCHASES_ARE_COMPLETED_BY {
|
|
|
211
211
|
*/
|
|
212
212
|
REVENUECAT = "REVENUECAT"
|
|
213
213
|
}
|
|
214
|
+
/**
|
|
215
|
+
* Configuration option that specifies that your app will complete purchases.
|
|
216
|
+
* @public
|
|
217
|
+
*/
|
|
218
|
+
export type PurchasesAreCompletedByMyApp = {
|
|
219
|
+
type: PURCHASES_ARE_COMPLETED_BY_TYPE.MY_APP;
|
|
220
|
+
/**
|
|
221
|
+
* The version of StoreKit that your app is using to make purchases. This value is ignored
|
|
222
|
+
* on Android, so if your app is Android-only, you may provide any value.
|
|
223
|
+
*/
|
|
224
|
+
storeKitVersion: STOREKIT_VERSION;
|
|
225
|
+
};
|
|
226
|
+
/**
|
|
227
|
+
* Allows you to specify whether you want RevenueCat to complete your app's purchases
|
|
228
|
+
* or if your app will do so.
|
|
229
|
+
*
|
|
230
|
+
* You can configure RevenueCat to complete your purchases like so:
|
|
231
|
+
* ```typescript
|
|
232
|
+
* Purchases.configure({
|
|
233
|
+
* apiKey: "123",
|
|
234
|
+
* purchasesAreCompletedBy: PURCHASES_ARE_COMPLETED_BY.REVENUECAT,
|
|
235
|
+
* });
|
|
236
|
+
* ```
|
|
237
|
+
*
|
|
238
|
+
* You can specify that purchase are completed by your app like so:
|
|
239
|
+
* ```typescript
|
|
240
|
+
* Purchases.configure({
|
|
241
|
+
* apiKey: "123",
|
|
242
|
+
* purchasesAreCompletedBy: {
|
|
243
|
+
* type: PURCHASES_ARE_COMPLETED_BY.MY_APP,
|
|
244
|
+
* storeKitVersion: STOREKIT_VERSION.STOREKIT_1
|
|
245
|
+
* },
|
|
246
|
+
* });
|
|
247
|
+
* ```
|
|
248
|
+
* @public
|
|
249
|
+
*/
|
|
250
|
+
export type PurchasesAreCompletedBy = PURCHASES_ARE_COMPLETED_BY_TYPE.REVENUECAT | PurchasesAreCompletedByMyApp;
|
package/dist/enums.js
CHANGED
|
@@ -208,8 +208,8 @@ export var STOREKIT_VERSION;
|
|
|
208
208
|
* Modes for completing the purchase process.
|
|
209
209
|
* @public
|
|
210
210
|
*/
|
|
211
|
-
export var
|
|
212
|
-
(function (
|
|
211
|
+
export var PURCHASES_ARE_COMPLETED_BY_TYPE;
|
|
212
|
+
(function (PURCHASES_ARE_COMPLETED_BY_TYPE) {
|
|
213
213
|
/**
|
|
214
214
|
* RevenueCat will **not** automatically acknowledge any purchases. You will have to do so manually.
|
|
215
215
|
*
|
|
@@ -218,9 +218,9 @@ export var PURCHASES_ARE_COMPLETED_BY;
|
|
|
218
218
|
*
|
|
219
219
|
* For more info, see [revenuecat.com](https://docs.revenuecat.com/docs/observer-mode#option-2-client-side).
|
|
220
220
|
*/
|
|
221
|
-
|
|
221
|
+
PURCHASES_ARE_COMPLETED_BY_TYPE["MY_APP"] = "MY_APP";
|
|
222
222
|
/**
|
|
223
223
|
* RevenueCat will automatically acknowledge verified purchases. No action is required by you.
|
|
224
224
|
*/
|
|
225
|
-
|
|
226
|
-
})(
|
|
225
|
+
PURCHASES_ARE_COMPLETED_BY_TYPE["REVENUECAT"] = "REVENUECAT";
|
|
226
|
+
})(PURCHASES_ARE_COMPLETED_BY_TYPE || (PURCHASES_ARE_COMPLETED_BY_TYPE = {}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ENTITLEMENT_VERIFICATION_MODE, STOREKIT_VERSION,
|
|
1
|
+
import { ENTITLEMENT_VERIFICATION_MODE, STOREKIT_VERSION, PurchasesAreCompletedBy } from "./enums";
|
|
2
2
|
/**
|
|
3
3
|
* Holds parameters to initialize the SDK.
|
|
4
4
|
* @public
|
|
@@ -13,18 +13,14 @@ export interface PurchasesConfiguration {
|
|
|
13
13
|
*/
|
|
14
14
|
appUserID?: string | null;
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
17
|
-
* want to use
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Set this to MY_APP if you have your own IAP implementation and
|
|
24
|
-
* want to use only RevenueCat's backend. Default is REVENUECAT. If you are on Android and setting this to MY_APP, you will have
|
|
25
|
-
* to acknowledge the purchases yourself.
|
|
16
|
+
* Set this to MY_APP and provide a STOREKIT_VERSION if you have your own IAP implementation and
|
|
17
|
+
* want to only use RevenueCat's backend. Defaults to PURCHASES_ARE_COMPLETED_BY_TYPE.REVENUECAT.
|
|
18
|
+
*
|
|
19
|
+
* If you are on Android and setting this to MY_APP, will have to acknowledge the purchases yourself.
|
|
20
|
+
* If your app is only on Android, you may specify any StoreKit version, as it is ignored by the
|
|
21
|
+
* Android SDK.
|
|
26
22
|
*/
|
|
27
|
-
purchasesAreCompletedBy?:
|
|
23
|
+
purchasesAreCompletedBy?: PurchasesAreCompletedBy;
|
|
28
24
|
/**
|
|
29
25
|
* An optional string. iOS-only, will be ignored for Android.
|
|
30
26
|
* Set this if you would like the RevenueCat SDK to store its preferences in a different NSUserDefaults
|
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": "
|
|
4
|
+
"version": "13.0.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",
|