@revenuecat/purchases-typescript-internal 6.1.3 → 6.3.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.
@@ -52,6 +52,10 @@ export interface PurchasesEntitlementInfo {
52
52
  * The product identifier that unlocked this entitlement
53
53
  */
54
54
  readonly productIdentifier: string;
55
+ /**
56
+ * The product plan identifier that unlocked this entitlement. Android subscriptions only, null on consumables and iOS.
57
+ */
58
+ readonly productPlanIdentifier: string | null;
55
59
  /**
56
60
  * False if this entitlement is unlocked via a production purchase
57
61
  */
@@ -94,6 +94,10 @@ export interface PurchasesStoreProduct {
94
94
  * Product category.
95
95
  */
96
96
  readonly productCategory: PRODUCT_CATEGORY | null;
97
+ /**
98
+ * The specific type of subscription or one time purchase this product represents
99
+ */
100
+ readonly productType: PRODUCT_TYPE;
97
101
  /**
98
102
  * Subscription period, specified in ISO 8601 format. For example,
99
103
  * P1W equates to one week, P1M equates to one month,
@@ -130,6 +134,32 @@ export declare enum PRODUCT_CATEGORY {
130
134
  */
131
135
  UNKNOWN = "UNKNOWN"
132
136
  }
137
+ export declare enum PRODUCT_TYPE {
138
+ /**
139
+ * A consumable in-app purchase.
140
+ */
141
+ CONSUMABLE = "CONSUMABLE",
142
+ /**
143
+ * A non-consumable in-app purchase. Only applies to Apple Store products.
144
+ */
145
+ NON_CONSUMABLE = "NON_CONSUMABLE",
146
+ /**
147
+ * A non-renewing subscription. Only applies to Apple Store products.
148
+ */
149
+ NON_RENEWABLE_SUBSCRIPTION = "NON_RENEWABLE_SUBSCRIPTION",
150
+ /**
151
+ * An auto-renewable subscription.
152
+ */
153
+ AUTO_RENEWABLE_SUBSCRIPTION = "AUTO_RENEWABLE_SUBSCRIPTION",
154
+ /**
155
+ * A subscription that is pre-paid. Only applies to Google Play products.
156
+ */
157
+ PREPAID_SUBSCRIPTION = "PREPAID_SUBSCRIPTION",
158
+ /**
159
+ * Unable to determine product type.
160
+ */
161
+ UNKNOWN = "UNKNOWN"
162
+ }
133
163
  export interface PurchasesStoreProductDiscount {
134
164
  /**
135
165
  * Identifier of the discount.
package/dist/offerings.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PERIOD_UNIT = exports.OFFER_PAYMENT_MODE = exports.RECURRENCE_MODE = exports.PRORATION_MODE = exports.PRODUCT_CATEGORY = exports.INTRO_ELIGIBILITY_STATUS = exports.PACKAGE_TYPE = void 0;
3
+ exports.PERIOD_UNIT = exports.OFFER_PAYMENT_MODE = exports.RECURRENCE_MODE = exports.PRORATION_MODE = exports.PRODUCT_TYPE = exports.PRODUCT_CATEGORY = exports.INTRO_ELIGIBILITY_STATUS = exports.PACKAGE_TYPE = void 0;
4
4
  var PACKAGE_TYPE;
5
5
  (function (PACKAGE_TYPE) {
6
6
  /**
@@ -74,6 +74,33 @@ var PRODUCT_CATEGORY;
74
74
  */
75
75
  PRODUCT_CATEGORY["UNKNOWN"] = "UNKNOWN";
76
76
  })(PRODUCT_CATEGORY || (exports.PRODUCT_CATEGORY = PRODUCT_CATEGORY = {}));
77
+ var PRODUCT_TYPE;
78
+ (function (PRODUCT_TYPE) {
79
+ /**
80
+ * A consumable in-app purchase.
81
+ */
82
+ PRODUCT_TYPE["CONSUMABLE"] = "CONSUMABLE";
83
+ /**
84
+ * A non-consumable in-app purchase. Only applies to Apple Store products.
85
+ */
86
+ PRODUCT_TYPE["NON_CONSUMABLE"] = "NON_CONSUMABLE";
87
+ /**
88
+ * A non-renewing subscription. Only applies to Apple Store products.
89
+ */
90
+ PRODUCT_TYPE["NON_RENEWABLE_SUBSCRIPTION"] = "NON_RENEWABLE_SUBSCRIPTION";
91
+ /**
92
+ * An auto-renewable subscription.
93
+ */
94
+ PRODUCT_TYPE["AUTO_RENEWABLE_SUBSCRIPTION"] = "AUTO_RENEWABLE_SUBSCRIPTION";
95
+ /**
96
+ * A subscription that is pre-paid. Only applies to Google Play products.
97
+ */
98
+ PRODUCT_TYPE["PREPAID_SUBSCRIPTION"] = "PREPAID_SUBSCRIPTION";
99
+ /**
100
+ * Unable to determine product type.
101
+ */
102
+ PRODUCT_TYPE["UNKNOWN"] = "UNKNOWN";
103
+ })(PRODUCT_TYPE || (exports.PRODUCT_TYPE = PRODUCT_TYPE = {}));
77
104
  var PRORATION_MODE;
78
105
  (function (PRORATION_MODE) {
79
106
  PRORATION_MODE[PRORATION_MODE["UNKNOWN_SUBSCRIPTION_UPGRADE_DOWNGRADE_POLICY"] = 0] = "UNKNOWN_SUBSCRIPTION_UPGRADE_DOWNGRADE_POLICY";
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.1.3",
4
+ "version": "6.3.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",