@revenuecat/purchases-typescript-internal 19.7.0 → 19.9.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/offerings.d.ts +75 -1
- package/dist/offerings.js +20 -1
- package/package.json +1 -1
package/dist/offerings.d.ts
CHANGED
|
@@ -69,6 +69,12 @@ export declare enum INTRO_ELIGIBILITY_STATUS {
|
|
|
69
69
|
export interface PurchasesStoreProduct {
|
|
70
70
|
/**
|
|
71
71
|
* Product Id.
|
|
72
|
+
*
|
|
73
|
+
* For Google Play subscriptions with a base plan, this is `productId:basePlanId`.
|
|
74
|
+
*
|
|
75
|
+
* For App Store products with a billing plan
|
|
76
|
+
* (like monthly subscriptions with a 12-month commitment), this is
|
|
77
|
+
* `productId:billingPlan` (like `productId:monthly`).
|
|
72
78
|
*/
|
|
73
79
|
readonly identifier: string;
|
|
74
80
|
/**
|
|
@@ -82,11 +88,17 @@ export interface PurchasesStoreProduct {
|
|
|
82
88
|
/**
|
|
83
89
|
* Price of the product in the local currency.
|
|
84
90
|
* Contains the price value of defaultOption for Google Play.
|
|
91
|
+
*
|
|
92
|
+
* For monthly subscriptions with a 12-month commitment on the Apple App Store, the
|
|
93
|
+
* price will reflect the total amount paid across the commitment.
|
|
85
94
|
*/
|
|
86
95
|
readonly price: number;
|
|
87
96
|
/**
|
|
88
97
|
* Formatted price of the item, including its currency sign.
|
|
89
98
|
* Contains the formatted price value of defaultOption for Google Play.
|
|
99
|
+
*
|
|
100
|
+
* For monthly subscriptions with a 12-month commitment on the Apple App Store, the
|
|
101
|
+
* price string will reflect the total amount paid across the commitment.
|
|
90
102
|
*/
|
|
91
103
|
readonly priceString: string;
|
|
92
104
|
/**
|
|
@@ -183,6 +195,13 @@ export interface PurchasesStoreProduct {
|
|
|
183
195
|
* Null if not using offerings or if fetched directly from store via getProducts.
|
|
184
196
|
*/
|
|
185
197
|
readonly presentedOfferingContext: PresentedOfferingContext | null;
|
|
198
|
+
/**
|
|
199
|
+
* For installment subscriptions, the details of the installment plan the customer commits to.
|
|
200
|
+
* Null for non-installment subscriptions.
|
|
201
|
+
* iOS only. Always null on Android, use the installmentsInfo of the defaultOption or
|
|
202
|
+
* subscriptionOptions instead.
|
|
203
|
+
*/
|
|
204
|
+
readonly installmentsInfo: InstallmentsInfo | null;
|
|
186
205
|
}
|
|
187
206
|
/**
|
|
188
207
|
* Enum indicating possible product categories.
|
|
@@ -662,7 +681,26 @@ export interface SubscriptionOption {
|
|
|
662
681
|
readonly installmentsInfo: InstallmentsInfo | null;
|
|
663
682
|
}
|
|
664
683
|
/**
|
|
665
|
-
*
|
|
684
|
+
* Enum indicating the billing plan type of an installment subscription. iOS only.
|
|
685
|
+
* @public
|
|
686
|
+
*/
|
|
687
|
+
export declare enum BILLING_PLAN_TYPE {
|
|
688
|
+
/**
|
|
689
|
+
* The customer pays in full when purchasing the product.
|
|
690
|
+
*/
|
|
691
|
+
UP_FRONT = "UP_FRONT",
|
|
692
|
+
/**
|
|
693
|
+
* The customer pays in monthly installments.
|
|
694
|
+
*/
|
|
695
|
+
MONTHLY = "MONTHLY",
|
|
696
|
+
/**
|
|
697
|
+
* Unable to determine the billing plan type.
|
|
698
|
+
*/
|
|
699
|
+
UNKNOWN = "UNKNOWN"
|
|
700
|
+
}
|
|
701
|
+
/**
|
|
702
|
+
* Type containing information of installment subscriptions.
|
|
703
|
+
* Supported in Google Play (via SubscriptionOption) and iOS (via PurchasesStoreProduct).
|
|
666
704
|
* @public
|
|
667
705
|
*/
|
|
668
706
|
export interface InstallmentsInfo {
|
|
@@ -672,8 +710,44 @@ export interface InstallmentsInfo {
|
|
|
672
710
|
readonly commitmentPaymentsCount: number;
|
|
673
711
|
/**
|
|
674
712
|
* After the commitment payments are complete, the number of payments the user commits to upon a renewal.
|
|
713
|
+
* On iOS this is always equal to commitmentPaymentsCount.
|
|
675
714
|
*/
|
|
676
715
|
readonly renewalCommitmentPaymentsCount: number;
|
|
716
|
+
/**
|
|
717
|
+
* Duration of each installment, specified in ISO 8601 format. For example, P1M equates to one month.
|
|
718
|
+
* iOS only. Null on Android.
|
|
719
|
+
*/
|
|
720
|
+
readonly commitmentInstallmentPeriod: string | null;
|
|
721
|
+
/**
|
|
722
|
+
* Price charged for each installment billing period.
|
|
723
|
+
* iOS only. Null on Android.
|
|
724
|
+
*/
|
|
725
|
+
readonly installmentBillingPrice: number | null;
|
|
726
|
+
/**
|
|
727
|
+
* Formatted price charged for each installment billing period, including its currency sign.
|
|
728
|
+
* iOS only. Null on Android.
|
|
729
|
+
*/
|
|
730
|
+
readonly installmentBillingPriceString: string | null;
|
|
731
|
+
/**
|
|
732
|
+
* Total duration of the customer's installment commitment, specified in ISO 8601 format.
|
|
733
|
+
* iOS only. Null on Android.
|
|
734
|
+
*/
|
|
735
|
+
readonly commitmentTotalPeriod: string | null;
|
|
736
|
+
/**
|
|
737
|
+
* Total price the customer commits to paying across all installments.
|
|
738
|
+
* iOS only. Null on Android.
|
|
739
|
+
*/
|
|
740
|
+
readonly commitmentTotalPrice: number | null;
|
|
741
|
+
/**
|
|
742
|
+
* Formatted total price the customer commits to paying across all installments, including its currency sign.
|
|
743
|
+
* iOS only. Null on Android.
|
|
744
|
+
*/
|
|
745
|
+
readonly commitmentTotalPriceString: string | null;
|
|
746
|
+
/**
|
|
747
|
+
* The billing plan used for the installments.
|
|
748
|
+
* iOS only. Null on Android.
|
|
749
|
+
*/
|
|
750
|
+
readonly billingPlanType: BILLING_PLAN_TYPE | null;
|
|
677
751
|
}
|
|
678
752
|
/**
|
|
679
753
|
* Contains all the details associated with a PricingPhase
|
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.STORE_REPLACEMENT_MODE = exports.PRORATION_MODE = exports.PRODUCT_TYPE = exports.PRODUCT_CATEGORY = exports.INTRO_ELIGIBILITY_STATUS = exports.PACKAGE_TYPE = void 0;
|
|
3
|
+
exports.PERIOD_UNIT = exports.OFFER_PAYMENT_MODE = exports.RECURRENCE_MODE = exports.BILLING_PLAN_TYPE = exports.STORE_REPLACEMENT_MODE = exports.PRORATION_MODE = exports.PRODUCT_TYPE = exports.PRODUCT_CATEGORY = exports.INTRO_ELIGIBILITY_STATUS = exports.PACKAGE_TYPE = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Enum indicating possible package types.
|
|
6
6
|
* @public
|
|
@@ -191,6 +191,25 @@ var STORE_REPLACEMENT_MODE;
|
|
|
191
191
|
*/
|
|
192
192
|
STORE_REPLACEMENT_MODE["DEFERRED"] = "DEFERRED";
|
|
193
193
|
})(STORE_REPLACEMENT_MODE || (exports.STORE_REPLACEMENT_MODE = STORE_REPLACEMENT_MODE = {}));
|
|
194
|
+
/**
|
|
195
|
+
* Enum indicating the billing plan type of an installment subscription. iOS only.
|
|
196
|
+
* @public
|
|
197
|
+
*/
|
|
198
|
+
var BILLING_PLAN_TYPE;
|
|
199
|
+
(function (BILLING_PLAN_TYPE) {
|
|
200
|
+
/**
|
|
201
|
+
* The customer pays in full when purchasing the product.
|
|
202
|
+
*/
|
|
203
|
+
BILLING_PLAN_TYPE["UP_FRONT"] = "UP_FRONT";
|
|
204
|
+
/**
|
|
205
|
+
* The customer pays in monthly installments.
|
|
206
|
+
*/
|
|
207
|
+
BILLING_PLAN_TYPE["MONTHLY"] = "MONTHLY";
|
|
208
|
+
/**
|
|
209
|
+
* Unable to determine the billing plan type.
|
|
210
|
+
*/
|
|
211
|
+
BILLING_PLAN_TYPE["UNKNOWN"] = "UNKNOWN";
|
|
212
|
+
})(BILLING_PLAN_TYPE || (exports.BILLING_PLAN_TYPE = BILLING_PLAN_TYPE = {}));
|
|
194
213
|
/**
|
|
195
214
|
* Recurrence mode for a pricing phase
|
|
196
215
|
* @public
|
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": "19.
|
|
4
|
+
"version": "19.9.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",
|