@revenuecat/purchases-js 0.5.0 → 0.6.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/Purchases.es.d.ts +21 -1
- package/dist/Purchases.es.js +1278 -1224
- package/dist/Purchases.umd.js +4 -4
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/Purchases.es.d.ts
CHANGED
|
@@ -170,6 +170,18 @@ export declare enum ErrorCode {
|
|
|
170
170
|
InvalidEmailError = 38
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
+
/**
|
|
174
|
+
* Parameters for the {@link Purchases.getOfferings}` method.
|
|
175
|
+
* @public
|
|
176
|
+
*/
|
|
177
|
+
export declare interface GetOfferingsParams {
|
|
178
|
+
/**
|
|
179
|
+
* The currency code in ISO 4217 to fetch the offerings for.
|
|
180
|
+
* If not specified, the default currency will be used.
|
|
181
|
+
*/
|
|
182
|
+
readonly currency?: string;
|
|
183
|
+
}
|
|
184
|
+
|
|
173
185
|
/**
|
|
174
186
|
* Parameters used to customise the http requests executed by purchases-js.
|
|
175
187
|
* @public
|
|
@@ -497,6 +509,10 @@ export declare interface Product {
|
|
|
497
509
|
* The context from which this product was obtained.
|
|
498
510
|
*/
|
|
499
511
|
readonly presentedOfferingContext: PresentedOfferingContext;
|
|
512
|
+
/**
|
|
513
|
+
* The default purchase option for this product.
|
|
514
|
+
*/
|
|
515
|
+
readonly defaultPurchaseOption: PurchaseOption;
|
|
500
516
|
/**
|
|
501
517
|
* The default subscription option for this product. Null if no subscription
|
|
502
518
|
* options are available like in the case of consumables and non-consumables.
|
|
@@ -523,6 +539,10 @@ export declare interface PurchaseOption {
|
|
|
523
539
|
* The unique id for a purchase option
|
|
524
540
|
*/
|
|
525
541
|
readonly id: string;
|
|
542
|
+
/**
|
|
543
|
+
* The public price id for this subscription option.
|
|
544
|
+
*/
|
|
545
|
+
readonly priceId: string;
|
|
526
546
|
}
|
|
527
547
|
|
|
528
548
|
/**
|
|
@@ -586,7 +606,7 @@ export declare class Purchases {
|
|
|
586
606
|
* Fetch the configured offerings for this user. You can configure these
|
|
587
607
|
* in the RevenueCat dashboard.
|
|
588
608
|
*/
|
|
589
|
-
getOfferings(): Promise<Offerings>;
|
|
609
|
+
getOfferings(params?: GetOfferingsParams): Promise<Offerings>;
|
|
590
610
|
/**
|
|
591
611
|
* Convenience method to check whether a user is entitled to a specific
|
|
592
612
|
* entitlement. This will use {@link Purchases.getCustomerInfo} under the hood.
|