@revenuecat/purchases-typescript-internal 9.9.0 → 10.0.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.
@@ -118,8 +118,14 @@ export interface PurchasesStoreProduct {
118
118
  /**
119
119
  * Offering identifier the store product was presented from.
120
120
  * Null if not using offerings or if fetched directly from store via getProducts.
121
+ * @deprecated, use presentedOfferingContext
121
122
  */
122
123
  readonly presentedOfferingIdentifier: string | null;
124
+ /**
125
+ * Offering context this package belongs to.
126
+ * Null if not using offerings or if fetched directly from store via getProducts.
127
+ */
128
+ readonly presentedOfferingContext: PresentedOfferingContext | null;
123
129
  }
124
130
  export declare enum PRODUCT_CATEGORY {
125
131
  /**
@@ -236,8 +242,44 @@ export interface PurchasesPackage {
236
242
  readonly product: PurchasesStoreProduct;
237
243
  /**
238
244
  * Offering this package belongs to.
245
+ * @deprecated, use presentedOfferingContext
239
246
  */
240
247
  readonly offeringIdentifier: string;
248
+ /**
249
+ * Offering context this package belongs to.
250
+ * Null if not using offerings or if fetched directly from store via getProducts.
251
+ */
252
+ readonly presentedOfferingContext: PresentedOfferingContext;
253
+ }
254
+ /**
255
+ * Contains data about the context in which an offering was presented.
256
+ */
257
+ export interface PresentedOfferingContext {
258
+ /**
259
+ * The identifier of the offering used to obtain this object.
260
+ */
261
+ readonly offeringIdentifier: string;
262
+ /**
263
+ * The identifier of the placement used to obtain this object.
264
+ */
265
+ readonly placementIdentifier: string | null;
266
+ /**
267
+ * The revision of the targeting used to obtain this object.
268
+ */
269
+ readonly targetingContext: PresentedOfferingTargetingContext | null;
270
+ }
271
+ /**
272
+ * Contains data about the context in which an offering was presented.
273
+ */
274
+ export interface PresentedOfferingTargetingContext {
275
+ /**
276
+ * The revision of the targeting used to obtain this object.
277
+ */
278
+ readonly revision: string;
279
+ /**
280
+ * The rule id from the targeting used to obtain this object.
281
+ */
282
+ readonly ruleId: string;
241
283
  }
242
284
  /**
243
285
  * An offering is a collection of Packages (`PurchasesPackage`) available for the user to purchase.
@@ -442,8 +484,14 @@ export interface SubscriptionOption {
442
484
  readonly introPhase: PricingPhase | null;
443
485
  /**
444
486
  * Offering identifier the subscription option was presented from
487
+ * @deprecated, use presentedOfferingContext
445
488
  */
446
489
  readonly presentedOfferingIdentifier: string | null;
490
+ /**
491
+ * Offering context this package belongs to.
492
+ * Null if not using offerings or if fetched directly from store via getProducts.
493
+ */
494
+ readonly presentedOfferingContext: PresentedOfferingContext | null;
447
495
  }
448
496
  /**
449
497
  * Contains all the details associated with a PricingPhase
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": "9.9.0",
4
+ "version": "10.0.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",