@revenuecat/purchases-js 0.6.0 → 0.7.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.
@@ -171,7 +171,7 @@ export declare enum ErrorCode {
171
171
  }
172
172
 
173
173
  /**
174
- * Parameters for the {@link Purchases.getOfferings}` method.
174
+ * Parameters for the {@link Purchases.getOfferings} method.
175
175
  * @public
176
176
  */
177
177
  export declare interface GetOfferingsParams {
@@ -427,9 +427,14 @@ export declare interface PresentedOfferingContext {
427
427
  */
428
428
  export declare interface Price {
429
429
  /**
430
- * Price in full units of the currency.
430
+ * Price in cents of the currency.
431
+ * @deprecated - Use {@link Price.amountMicros} instead.
431
432
  */
432
433
  readonly amount: number;
434
+ /**
435
+ * Price in micro-units of the currency. For example, $9.99 is represented as 9990000.
436
+ */
437
+ readonly amountMicros: number;
433
438
  /**
434
439
  * Returns ISO 4217 currency code for price.
435
440
  * For example, if price is specified in British pounds sterling,
@@ -602,6 +607,14 @@ export declare class Purchases {
602
607
  * @throws {@link PurchasesError} if the API key or user id are invalid.
603
608
  */
604
609
  static configure(apiKey: string, appUserId: string, httpConfig?: HttpConfig): Purchases;
610
+ /**
611
+ * Loads and caches some optional data in the Purchases SDK.
612
+ * Currently only fetching branding information. You can call this method
613
+ * after configuring the SDK to speed up the first call to
614
+ * {@link Purchases.purchase}.
615
+ */
616
+ preload(): Promise<void>;
617
+ private hasLoadedResources;
605
618
  /**
606
619
  * Fetch the configured offerings for this user. You can configure these
607
620
  * in the RevenueCat dashboard.