@revenuecat/purchases-typescript-internal 6.3.0 → 7.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 CHANGED
@@ -59,3 +59,24 @@ export declare enum LOG_LEVEL {
59
59
  WARN = "WARN",
60
60
  ERROR = "ERROR"
61
61
  }
62
+ /**
63
+ * Enum for in-app message types.
64
+ * This can be used if you disable automatic in-app message from showing automatically.
65
+ * Then, you can pass what type of messages you want to show in the `showInAppMessages`
66
+ * method in Purchases.
67
+ */
68
+ export declare enum IN_APP_MESSAGE_TYPE {
69
+ /**
70
+ * In-app messages to indicate there has been a billing issue charging the user.
71
+ */
72
+ BILLING_ISSUE = 0,
73
+ /**
74
+ * iOS-only. This message will show if you increase the price of a subscription and
75
+ * the user needs to opt-in to the increase.
76
+ */
77
+ PRICE_INCREASE_CONSENT = 1,
78
+ /**
79
+ * iOS-only. StoreKit generic messages.
80
+ */
81
+ GENERIC = 2
82
+ }
package/dist/enums.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LOG_LEVEL = exports.REFUND_REQUEST_STATUS = exports.BILLING_FEATURE = exports.PURCHASE_TYPE = void 0;
3
+ 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
  */
@@ -66,3 +66,26 @@ var LOG_LEVEL;
66
66
  LOG_LEVEL["WARN"] = "WARN";
67
67
  LOG_LEVEL["ERROR"] = "ERROR";
68
68
  })(LOG_LEVEL || (exports.LOG_LEVEL = LOG_LEVEL = {}));
69
+ /**
70
+ * Enum for in-app message types.
71
+ * This can be used if you disable automatic in-app message from showing automatically.
72
+ * Then, you can pass what type of messages you want to show in the `showInAppMessages`
73
+ * method in Purchases.
74
+ */
75
+ var IN_APP_MESSAGE_TYPE;
76
+ (function (IN_APP_MESSAGE_TYPE) {
77
+ // Make sure the enum values are in sync with those defined in iOS/Android
78
+ /**
79
+ * In-app messages to indicate there has been a billing issue charging the user.
80
+ */
81
+ IN_APP_MESSAGE_TYPE[IN_APP_MESSAGE_TYPE["BILLING_ISSUE"] = 0] = "BILLING_ISSUE";
82
+ /**
83
+ * iOS-only. This message will show if you increase the price of a subscription and
84
+ * the user needs to opt-in to the increase.
85
+ */
86
+ IN_APP_MESSAGE_TYPE[IN_APP_MESSAGE_TYPE["PRICE_INCREASE_CONSENT"] = 1] = "PRICE_INCREASE_CONSENT";
87
+ /**
88
+ * iOS-only. StoreKit generic messages.
89
+ */
90
+ IN_APP_MESSAGE_TYPE[IN_APP_MESSAGE_TYPE["GENERIC"] = 2] = "GENERIC";
91
+ })(IN_APP_MESSAGE_TYPE || (exports.IN_APP_MESSAGE_TYPE = IN_APP_MESSAGE_TYPE = {}));
@@ -95,7 +95,8 @@ export interface PurchasesStoreProduct {
95
95
  */
96
96
  readonly productCategory: PRODUCT_CATEGORY | null;
97
97
  /**
98
- * The specific type of subscription or one time purchase this product represents
98
+ * The specific type of subscription or one time purchase this product represents.
99
+ * Important: In iOS, if using StoreKit 1, we cannot determine the type.
99
100
  */
100
101
  readonly productType: PRODUCT_TYPE;
101
102
  /**
@@ -374,11 +375,6 @@ export declare enum PRORATION_MODE {
374
375
  * next recurrence time. The billing cycle stays the same.
375
376
  */
376
377
  IMMEDIATE_WITHOUT_PRORATION = 3,
377
- /**
378
- * Replacement takes effect when the old plan expires, and the new price will
379
- * be charged at the same time.
380
- */
381
- DEFERRED = 4,
382
378
  /**
383
379
  * Replacement takes effect immediately, and the user is charged full price
384
380
  * of new plan and is given a full billing cycle of subscription,
package/dist/offerings.js CHANGED
@@ -120,11 +120,6 @@ var PRORATION_MODE;
120
120
  * next recurrence time. The billing cycle stays the same.
121
121
  */
122
122
  PRORATION_MODE[PRORATION_MODE["IMMEDIATE_WITHOUT_PRORATION"] = 3] = "IMMEDIATE_WITHOUT_PRORATION";
123
- /**
124
- * Replacement takes effect when the old plan expires, and the new price will
125
- * be charged at the same time.
126
- */
127
- PRORATION_MODE[PRORATION_MODE["DEFERRED"] = 4] = "DEFERRED";
128
123
  /**
129
124
  * Replacement takes effect immediately, and the user is charged full price
130
125
  * of new plan and is given a full billing cycle of subscription,
@@ -38,4 +38,11 @@ export interface PurchasesConfiguration {
38
38
  * An optional boolean. Android only. Required to configure the plugin to be used in the Amazon Appstore.
39
39
  */
40
40
  useAmazon?: boolean;
41
+ /**
42
+ * Whether we should show store in-app messages automatically. Both Google Play and the App Store provide in-app
43
+ * messages for some situations like billing issues. By default, those messages will be shown automatically.
44
+ * This allows to disable that behavior, so you can display those messages at your convenience. For more information,
45
+ * check: https://rev.cat/storekit-message and https://rev.cat/googleplayinappmessaging
46
+ */
47
+ shouldShowInAppMessagesAutomatically?: boolean;
41
48
  }
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": "6.3.0",
4
+ "version": "7.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",