@revenuecat/purchases-js 0.3.0 → 0.3.1

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.
@@ -341,6 +341,21 @@ export declare enum PackageType {
341
341
  Weekly = "$rc_weekly"
342
342
  }
343
343
 
344
+ /**
345
+ * Represents a period of time.
346
+ * @public
347
+ */
348
+ export declare interface Period {
349
+ /**
350
+ * The number of units in the period.
351
+ */
352
+ number: number;
353
+ /**
354
+ * The unit of time.
355
+ */
356
+ unit: PeriodUnit;
357
+ }
358
+
344
359
  /**
345
360
  * Supported period types for an entitlement.
346
361
  * - "normal" If the entitlement is not under an introductory or trial period.
@@ -350,6 +365,17 @@ export declare enum PackageType {
350
365
  */
351
366
  export declare type PeriodType = "normal" | "intro" | "trial";
352
367
 
368
+ /**
369
+ * Represents a unit of time.
370
+ * @public
371
+ */
372
+ export declare enum PeriodUnit {
373
+ Year = "year",
374
+ Month = "month",
375
+ Week = "week",
376
+ Day = "day"
377
+ }
378
+
353
379
  /**
354
380
  * Price information for a product.
355
381
  * @public
@@ -378,10 +404,13 @@ export declare interface Price {
378
404
  */
379
405
  export declare interface PricingPhase {
380
406
  /**
381
- * The duration of the purchase option price in ISO 8601 format.
382
- * For applicable options (trials, initial/promotional prices), otherwise null
407
+ * The duration of the phase in ISO 8601 format.
383
408
  */
384
409
  readonly periodDuration: string | null;
410
+ /**
411
+ * The duration of the phase as a {@link Period}.
412
+ */
413
+ readonly period: Period | null;
385
414
  /**
386
415
  * The price for the purchase option.
387
416
  * Null in case of trials.