react-native-purchases 6.3.0 → 6.5.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.
@@ -24,6 +24,6 @@ Pod::Spec.new do |spec|
24
24
  ]
25
25
 
26
26
  spec.dependency "React-Core"
27
- spec.dependency "PurchasesHybridCommon", '5.3.0'
27
+ spec.dependency "PurchasesHybridCommon", '5.5.0'
28
28
  spec.swift_version = '5.0'
29
29
  end
@@ -29,7 +29,7 @@ android {
29
29
  minSdkVersion getExtOrIntegerDefault('minSdkVersion')
30
30
  targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
31
31
  versionCode 1
32
- versionName '6.3.0'
32
+ versionName '6.5.0'
33
33
  }
34
34
 
35
35
  buildTypes {
@@ -121,6 +121,6 @@ def kotlin_version = getExtOrDefault('kotlinVersion')
121
121
  dependencies {
122
122
  //noinspection GradleDynamicVersion
123
123
  api 'com.facebook.react:react-native:+'
124
- implementation 'com.revenuecat.purchases:purchases-hybrid-common:5.3.0'
124
+ implementation 'com.revenuecat.purchases:purchases-hybrid-common:5.5.0'
125
125
  implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
126
126
  }
@@ -45,7 +45,7 @@ public class RNPurchasesModule extends ReactContextBaseJavaModule implements Upd
45
45
  private static final String CUSTOMER_INFO_UPDATED = "Purchases-CustomerInfoUpdated";
46
46
  private static final String LOG_HANDLER_EVENT = "Purchases-LogHandlerEvent";
47
47
  public static final String PLATFORM_NAME = "react-native";
48
- public static final String PLUGIN_VERSION = "6.3.0";
48
+ public static final String PLUGIN_VERSION = "6.5.0";
49
49
 
50
50
  private final ReactApplicationContext reactContext;
51
51
 
@@ -222,9 +222,14 @@ export interface PurchasesOffering {
222
222
  */
223
223
  readonly serverDescription: string;
224
224
  /**
225
- * Offering metadata defined in RevenueCat dashboard.
225
+ * Offering metadata defined in RevenueCat dashboard. To access values, you need
226
+ * to check the type beforehand. For example:
227
+ * const my_unknown_value: unknown = offering.metadata['my_key'];
228
+ * const my_string_value: string | undefined = typeof(my_unknown_value) === 'string' ? my_unknown_value : undefined;
226
229
  */
227
- readonly metadata: Map<string, any>;
230
+ readonly metadata: {
231
+ [key: string]: unknown;
232
+ };
228
233
  /**
229
234
  * Array of `Package` objects available for purchase.
230
235
  */
package/dist/purchases.js CHANGED
@@ -461,7 +461,7 @@ var Purchases = /** @class */ (function () {
461
461
  if (typeof discount === "undefined" || discount == null) {
462
462
  throw new Error("A discount is required");
463
463
  }
464
- return [2 /*return*/, RNPurchases.purchasePackage(aPackage.identifier, aPackage.offeringIdentifier, null, discount.timestamp.toString()).catch(function (error) {
464
+ return [2 /*return*/, RNPurchases.purchasePackage(aPackage.identifier, aPackage.offeringIdentifier, null, discount.timestamp.toString(), null).catch(function (error) {
465
465
  error.userCancelled = error.code === errors_1.PURCHASES_ERROR_CODE.PURCHASE_CANCELLED_ERROR;
466
466
  throw error;
467
467
  })];
package/ios/RNPurchases.m CHANGED
@@ -442,7 +442,7 @@ readyForPromotedProduct:(RCStoreProduct *)product
442
442
  }
443
443
 
444
444
  - (NSString *)platformFlavorVersion {
445
- return @"6.3.0";
445
+ return @"6.5.0";
446
446
  }
447
447
 
448
448
  @end
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-native-purchases",
3
3
  "title": "React Native Purchases",
4
- "version": "6.3.0",
4
+ "version": "6.5.0",
5
5
  "description": "React Native in-app purchases and subscriptions made easy. Supports iOS and Android. ",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -2,7 +2,7 @@
2
2
  <!DOCTYPE html>
3
3
  <html>
4
4
  <head>
5
- <meta http-equiv="refresh" content="0; url=https://revenuecat.github.io/react-native-purchases-docs/6.3.0/" />
5
+ <meta http-equiv="refresh" content="0; url=https://revenuecat.github.io/react-native-purchases-docs/6.5.0/" />
6
6
  </head>
7
7
  <body>
8
8
  </body>