@revenuecat/purchases-typescript-internal 9.7.2 → 10.0.0-beta.1

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 CHANGED
@@ -156,3 +156,22 @@ export declare enum PAYWALL_RESULT {
156
156
  */
157
157
  RESTORED = "RESTORED"
158
158
  }
159
+ /**
160
+ * Defines which version of StoreKit may be used
161
+ */
162
+ export declare enum STOREKIT_VERSION {
163
+ /**
164
+ * Always use StoreKit 1.
165
+ */
166
+ STOREKIT_1 = "STOREKIT_1",
167
+ /**
168
+ * Always use StoreKit 2 (StoreKit 1 will be used if StoreKit 2 is not available in the current device.)
169
+ * - Warning: Make sure you have an In-App Purchase Key configured in your app.
170
+ * Please see https://rev.cat/in-app-purchase-key-configuration for more info.
171
+ */
172
+ STOREKIT_2 = "STOREKIT_2",
173
+ /**
174
+ * Let RevenueCat use the most appropiate version of StoreKit
175
+ */
176
+ DEFAULT = "DEFAULT"
177
+ }
package/dist/enums.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PAYWALL_RESULT = exports.VERIFICATION_RESULT = exports.ENTITLEMENT_VERIFICATION_MODE = exports.IN_APP_MESSAGE_TYPE = exports.LOG_LEVEL = exports.REFUND_REQUEST_STATUS = exports.BILLING_FEATURE = exports.PURCHASE_TYPE = void 0;
3
+ exports.STOREKIT_VERSION = exports.PAYWALL_RESULT = exports.VERIFICATION_RESULT = exports.ENTITLEMENT_VERIFICATION_MODE = exports.IN_APP_MESSAGE_TYPE = exports.LOG_LEVEL = exports.REFUND_REQUEST_STATUS = exports.BILLING_FEATURE = exports.PURCHASE_TYPE = void 0;
4
4
  /**
5
5
  * @deprecated, use PRODUCT_CATEGORY
6
6
  */
@@ -170,3 +170,23 @@ var PAYWALL_RESULT;
170
170
  */
171
171
  PAYWALL_RESULT["RESTORED"] = "RESTORED";
172
172
  })(PAYWALL_RESULT || (exports.PAYWALL_RESULT = PAYWALL_RESULT = {}));
173
+ /**
174
+ * Defines which version of StoreKit may be used
175
+ */
176
+ var STOREKIT_VERSION;
177
+ (function (STOREKIT_VERSION) {
178
+ /**
179
+ * Always use StoreKit 1.
180
+ */
181
+ STOREKIT_VERSION["STOREKIT_1"] = "STOREKIT_1";
182
+ /**
183
+ * Always use StoreKit 2 (StoreKit 1 will be used if StoreKit 2 is not available in the current device.)
184
+ * - Warning: Make sure you have an In-App Purchase Key configured in your app.
185
+ * Please see https://rev.cat/in-app-purchase-key-configuration for more info.
186
+ */
187
+ STOREKIT_VERSION["STOREKIT_2"] = "STOREKIT_2";
188
+ /**
189
+ * Let RevenueCat use the most appropiate version of StoreKit
190
+ */
191
+ STOREKIT_VERSION["DEFAULT"] = "DEFAULT";
192
+ })(STOREKIT_VERSION || (exports.STOREKIT_VERSION = STOREKIT_VERSION = {}));
@@ -1,4 +1,4 @@
1
- import { ENTITLEMENT_VERIFICATION_MODE } from "./enums";
1
+ import { ENTITLEMENT_VERIFICATION_MODE, STOREKIT_VERSION } from "./enums";
2
2
  /**
3
3
  * Holds parameters to initialize the SDK.
4
4
  */
@@ -25,16 +25,15 @@ export interface PurchasesConfiguration {
25
25
  userDefaultsSuiteName?: string;
26
26
  /**
27
27
  * iOS-only, will be ignored for Android.
28
- * Set this to TRUE to enable StoreKit2.
29
- * Default is FALSE.
28
+ * Default is STOREKIT_2.
30
29
  *
31
- * @deprecated RevenueCat currently uses StoreKit 1 for purchases, as its stability in production scenarios has
32
- * proven to be more performant than StoreKit 2.
33
- * We're collecting more data on the best approach, but StoreKit 1 vs StoreKit 2 is an implementation detail
34
- * that you shouldn't need to care about.
35
- * We recommend not using this parameter, letting RevenueCat decide for you which StoreKit implementation to use.
30
+ * - Warning: Make sure you have an In-App Purchase Key configured in your app.
31
+ * Please see https://rev.cat/in-app-purchase-key-configuration for more info.
32
+ *
33
+ * - Note: StoreKit 2 is only available on iOS 15+. StoreKit 1 will be used for previous iOS versions
34
+ * regardless of this setting.
36
35
  */
37
- usesStoreKit2IfAvailable?: boolean;
36
+ storeKitVersion?: STOREKIT_VERSION;
38
37
  /**
39
38
  * An optional boolean. Android only. Required to configure the plugin to be used in the Amazon Appstore.
40
39
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@revenuecat/purchases-typescript-internal",
3
3
  "title": "Purchases typescript internal shared code",
4
- "version": "9.7.2",
4
+ "version": "10.0.0-beta.1",
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",