react-native-purchases 6.6.2 → 6.6.4

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.6.3'
27
+ spec.dependency "PurchasesHybridCommon", '6.1.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.6.2'
32
+ versionName '6.6.4'
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.6.3'
124
+ implementation 'com.revenuecat.purchases:purchases-hybrid-common:6.1.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.6.2";
48
+ public static final String PLUGIN_VERSION = "6.6.4";
49
49
 
50
50
  private final ReactApplicationContext reactContext;
51
51
 
@@ -1,158 +1 @@
1
- /**
2
- * The EntitlementInfo object gives you access to all of the information about the status of a user entitlement.
3
- */
4
- export interface PurchasesEntitlementInfo {
5
- /**
6
- * The entitlement identifier configured in the RevenueCat dashboard
7
- */
8
- readonly identifier: string;
9
- /**
10
- * True if the user has access to this entitlement
11
- */
12
- readonly isActive: boolean;
13
- /**
14
- * True if the underlying subscription is set to renew at the end of the billing period (expirationDate).
15
- */
16
- readonly willRenew: boolean;
17
- /**
18
- * The last period type this entitlement was in. Either: NORMAL, INTRO, TRIAL.
19
- */
20
- readonly periodType: string;
21
- /**
22
- * The latest purchase or renewal date for the entitlement.
23
- */
24
- readonly latestPurchaseDate: string;
25
- /**
26
- * The first date this entitlement was purchased.
27
- */
28
- readonly originalPurchaseDate: string;
29
- /**
30
- * The expiration date for the entitlement, can be `null` for lifetime access. If the `periodType` is `trial`,
31
- * this is the trial expiration date.
32
- */
33
- readonly expirationDate: string | null;
34
- /**
35
- * The store where this entitlement was unlocked from.
36
- */
37
- readonly store: "PLAY_STORE" | "APP_STORE" | "STRIPE" | "MAC_APP_STORE" | "PROMOTIONAL" | "AMAZON" | "UNKNOWN_STORE";
38
- /**
39
- * The product identifier that unlocked this entitlement
40
- */
41
- readonly productIdentifier: string;
42
- /**
43
- * False if this entitlement is unlocked via a production purchase
44
- */
45
- readonly isSandbox: boolean;
46
- /**
47
- * The date an unsubscribe was detected. Can be `null`.
48
- *
49
- * @note: Entitlement may still be active even if user has unsubscribed. Check the `isActive` property.
50
- */
51
- readonly unsubscribeDetectedAt: string | null;
52
- /**
53
- * The date a billing issue was detected. Can be `null` if there is no billing issue or an issue has been resolved
54
- *
55
- * @note: Entitlement may still be active even if there is a billing issue. Check the `isActive` property.
56
- */
57
- readonly billingIssueDetectedAt: string | null;
58
- }
59
- /**
60
- * Contains all the entitlements associated to the user.
61
- */
62
- export interface PurchasesEntitlementInfos {
63
- /**
64
- * Map of all EntitlementInfo (`PurchasesEntitlementInfo`) objects (active and inactive) keyed by entitlement identifier.
65
- */
66
- readonly all: {
67
- [key: string]: PurchasesEntitlementInfo;
68
- };
69
- /**
70
- * Map of active EntitlementInfo (`PurchasesEntitlementInfo`) objects keyed by entitlement identifier.
71
- */
72
- readonly active: {
73
- [key: string]: PurchasesEntitlementInfo;
74
- };
75
- }
76
- export interface CustomerInfo {
77
- /**
78
- * Entitlements attached to this customer info
79
- */
80
- readonly entitlements: PurchasesEntitlementInfos;
81
- /**
82
- * Set of active subscription skus
83
- */
84
- readonly activeSubscriptions: string[];
85
- /**
86
- * Set of purchased skus, active and inactive
87
- */
88
- readonly allPurchasedProductIdentifiers: string[];
89
- /**
90
- * The latest expiration date of all purchased skus
91
- */
92
- readonly latestExpirationDate: string | null;
93
- /**
94
- * The date this user was first seen in RevenueCat.
95
- */
96
- readonly firstSeen: string;
97
- /**
98
- * The original App User Id recorded for this user.
99
- */
100
- readonly originalAppUserId: string;
101
- /**
102
- * Date when this info was requested
103
- */
104
- readonly requestDate: string;
105
- /**
106
- * Map of skus to expiration dates
107
- */
108
- readonly allExpirationDates: {
109
- [key: string]: string | null;
110
- };
111
- /**
112
- * Map of skus to purchase dates
113
- */
114
- readonly allPurchaseDates: {
115
- [key: string]: string | null;
116
- };
117
- /**
118
- * Returns the version number for the version of the application when the
119
- * user bought the app. Use this for grandfathering users when migrating
120
- * to subscriptions.
121
- *
122
- * This corresponds to the value of CFBundleVersion (in iOS) in the
123
- * Info.plist file when the purchase was originally made. This is always null
124
- * in Android
125
- */
126
- readonly originalApplicationVersion: string | null;
127
- /**
128
- * Returns the purchase date for the version of the application when the user bought the app.
129
- * Use this for grandfathering users when migrating to subscriptions.
130
- */
131
- readonly originalPurchaseDate: string | null;
132
- /**
133
- * URL to manage the active subscription of the user. If this user has an active iOS
134
- * subscription, this will point to the App Store, if the user has an active Play Store subscription
135
- * it will point there. If there are no active subscriptions it will be null.
136
- * If there are multiple for different platforms, it will point to the device store.
137
- */
138
- readonly managementURL: string | null;
139
- readonly nonSubscriptionTransactions: PurchasesStoreTransaction[];
140
- }
141
- /**
142
- * List of all non subscription transactions. Use this to fetch the history of
143
- * non-subscription purchases
144
- */
145
- export interface PurchasesStoreTransaction {
146
- /**
147
- * Id of the transaction.
148
- */
149
- transactionIdentifier: string;
150
- /**
151
- * Product Id associated with the transaction.
152
- */
153
- productIdentifier: string;
154
- /**
155
- * Purchase date of the transaction in ISO 8601 format.
156
- */
157
- purchaseDate: string;
158
- }
1
+ export * from '@revenuecat/purchases-typescript-internal/dist/customerInfo';
@@ -1,2 +1,18 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ // This file is kept to keep backwards compatibility to any possible users using this file directly
18
+ __exportStar(require("@revenuecat/purchases-typescript-internal/dist/customerInfo"), exports);
package/dist/errors.d.ts CHANGED
@@ -1,60 +1 @@
1
- export declare enum PURCHASES_ERROR_CODE {
2
- UNKNOWN_ERROR = "0",
3
- PURCHASE_CANCELLED_ERROR = "1",
4
- STORE_PROBLEM_ERROR = "2",
5
- PURCHASE_NOT_ALLOWED_ERROR = "3",
6
- PURCHASE_INVALID_ERROR = "4",
7
- PRODUCT_NOT_AVAILABLE_FOR_PURCHASE_ERROR = "5",
8
- PRODUCT_ALREADY_PURCHASED_ERROR = "6",
9
- RECEIPT_ALREADY_IN_USE_ERROR = "7",
10
- INVALID_RECEIPT_ERROR = "8",
11
- MISSING_RECEIPT_FILE_ERROR = "9",
12
- NETWORK_ERROR = "10",
13
- INVALID_CREDENTIALS_ERROR = "11",
14
- UNEXPECTED_BACKEND_RESPONSE_ERROR = "12",
15
- RECEIPT_IN_USE_BY_OTHER_SUBSCRIBER_ERROR = "13",
16
- INVALID_APP_USER_ID_ERROR = "14",
17
- OPERATION_ALREADY_IN_PROGRESS_ERROR = "15",
18
- UNKNOWN_BACKEND_ERROR = "16",
19
- INVALID_APPLE_SUBSCRIPTION_KEY_ERROR = "17",
20
- INELIGIBLE_ERROR = "18",
21
- INSUFFICIENT_PERMISSIONS_ERROR = "19",
22
- PAYMENT_PENDING_ERROR = "20",
23
- INVALID_SUBSCRIBER_ATTRIBUTES_ERROR = "21",
24
- LOG_OUT_ANONYMOUS_USER_ERROR = "22",
25
- CONFIGURATION_ERROR = "23",
26
- UNSUPPORTED_ERROR = "24",
27
- EMPTY_SUBSCRIBER_ATTRIBUTES_ERROR = "25",
28
- PRODUCT_DISCOUNT_MISSING_IDENTIFIER_ERROR = "26",
29
- PRODUCT_DISCOUNT_MISSING_SUBSCRIPTION_GROUP_IDENTIFIER_ERROR = "28",
30
- CUSTOMER_INFO_ERROR = "29",
31
- SYSTEM_INFO_ERROR = "30",
32
- BEGIN_REFUND_REQUEST_ERROR = "31",
33
- PRODUCT_REQUEST_TIMED_OUT_ERROR = "32",
34
- API_ENDPOINT_BLOCKED = "33",
35
- INVALID_PROMOTIONAL_OFFER_ERROR = "34",
36
- OFFLINE_CONNECTION_ERROR = "35"
37
- }
38
- export interface PurchasesError {
39
- code: PURCHASES_ERROR_CODE;
40
- message: string;
41
- readableErrorCode: string;
42
- userInfo: ErrorInfo;
43
- underlyingErrorMessage: string;
44
- userCancelled: boolean | null;
45
- }
46
- export interface ErrorInfo {
47
- readableErrorCode: string;
48
- }
49
- /**
50
- * @internal
51
- */
52
- export declare class UninitializedPurchasesError extends Error {
53
- constructor();
54
- }
55
- /**
56
- * @internal
57
- */
58
- export declare class UnsupportedPlatformError extends Error {
59
- constructor();
60
- }
1
+ export * from '@revenuecat/purchases-typescript-internal/dist/errors';
package/dist/errors.js CHANGED
@@ -1,88 +1,18 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.UnsupportedPlatformError = exports.UninitializedPurchasesError = exports.PURCHASES_ERROR_CODE = void 0;
19
- /* tslint:disable:max-classes-per-file */
20
- // Error codes indicating the reason for an error.
21
- var PURCHASES_ERROR_CODE;
22
- (function (PURCHASES_ERROR_CODE) {
23
- PURCHASES_ERROR_CODE["UNKNOWN_ERROR"] = "0";
24
- PURCHASES_ERROR_CODE["PURCHASE_CANCELLED_ERROR"] = "1";
25
- PURCHASES_ERROR_CODE["STORE_PROBLEM_ERROR"] = "2";
26
- PURCHASES_ERROR_CODE["PURCHASE_NOT_ALLOWED_ERROR"] = "3";
27
- PURCHASES_ERROR_CODE["PURCHASE_INVALID_ERROR"] = "4";
28
- PURCHASES_ERROR_CODE["PRODUCT_NOT_AVAILABLE_FOR_PURCHASE_ERROR"] = "5";
29
- PURCHASES_ERROR_CODE["PRODUCT_ALREADY_PURCHASED_ERROR"] = "6";
30
- PURCHASES_ERROR_CODE["RECEIPT_ALREADY_IN_USE_ERROR"] = "7";
31
- PURCHASES_ERROR_CODE["INVALID_RECEIPT_ERROR"] = "8";
32
- PURCHASES_ERROR_CODE["MISSING_RECEIPT_FILE_ERROR"] = "9";
33
- PURCHASES_ERROR_CODE["NETWORK_ERROR"] = "10";
34
- PURCHASES_ERROR_CODE["INVALID_CREDENTIALS_ERROR"] = "11";
35
- PURCHASES_ERROR_CODE["UNEXPECTED_BACKEND_RESPONSE_ERROR"] = "12";
36
- PURCHASES_ERROR_CODE["RECEIPT_IN_USE_BY_OTHER_SUBSCRIBER_ERROR"] = "13";
37
- PURCHASES_ERROR_CODE["INVALID_APP_USER_ID_ERROR"] = "14";
38
- PURCHASES_ERROR_CODE["OPERATION_ALREADY_IN_PROGRESS_ERROR"] = "15";
39
- PURCHASES_ERROR_CODE["UNKNOWN_BACKEND_ERROR"] = "16";
40
- PURCHASES_ERROR_CODE["INVALID_APPLE_SUBSCRIPTION_KEY_ERROR"] = "17";
41
- PURCHASES_ERROR_CODE["INELIGIBLE_ERROR"] = "18";
42
- PURCHASES_ERROR_CODE["INSUFFICIENT_PERMISSIONS_ERROR"] = "19";
43
- PURCHASES_ERROR_CODE["PAYMENT_PENDING_ERROR"] = "20";
44
- PURCHASES_ERROR_CODE["INVALID_SUBSCRIBER_ATTRIBUTES_ERROR"] = "21";
45
- PURCHASES_ERROR_CODE["LOG_OUT_ANONYMOUS_USER_ERROR"] = "22";
46
- PURCHASES_ERROR_CODE["CONFIGURATION_ERROR"] = "23";
47
- PURCHASES_ERROR_CODE["UNSUPPORTED_ERROR"] = "24";
48
- PURCHASES_ERROR_CODE["EMPTY_SUBSCRIBER_ATTRIBUTES_ERROR"] = "25";
49
- PURCHASES_ERROR_CODE["PRODUCT_DISCOUNT_MISSING_IDENTIFIER_ERROR"] = "26";
50
- PURCHASES_ERROR_CODE["PRODUCT_DISCOUNT_MISSING_SUBSCRIPTION_GROUP_IDENTIFIER_ERROR"] = "28";
51
- PURCHASES_ERROR_CODE["CUSTOMER_INFO_ERROR"] = "29";
52
- PURCHASES_ERROR_CODE["SYSTEM_INFO_ERROR"] = "30";
53
- PURCHASES_ERROR_CODE["BEGIN_REFUND_REQUEST_ERROR"] = "31";
54
- PURCHASES_ERROR_CODE["PRODUCT_REQUEST_TIMED_OUT_ERROR"] = "32";
55
- PURCHASES_ERROR_CODE["API_ENDPOINT_BLOCKED"] = "33";
56
- PURCHASES_ERROR_CODE["INVALID_PROMOTIONAL_OFFER_ERROR"] = "34";
57
- PURCHASES_ERROR_CODE["OFFLINE_CONNECTION_ERROR"] = "35";
58
- })(PURCHASES_ERROR_CODE = exports.PURCHASES_ERROR_CODE || (exports.PURCHASES_ERROR_CODE = {}));
59
- /**
60
- * @internal
61
- */
62
- var UninitializedPurchasesError = /** @class */ (function (_super) {
63
- __extends(UninitializedPurchasesError, _super);
64
- function UninitializedPurchasesError() {
65
- var _this = _super.call(this, "There is no singleton instance. " +
66
- "Make sure you configure Purchases before trying to get the default instance. " +
67
- "More info here: https://errors.rev.cat/configuring-sdk") || this;
68
- // Set the prototype explicitly.
69
- Object.setPrototypeOf(_this, UninitializedPurchasesError.prototype);
70
- return _this;
71
- }
72
- return UninitializedPurchasesError;
73
- }(Error));
74
- exports.UninitializedPurchasesError = UninitializedPurchasesError;
75
- /**
76
- * @internal
77
- */
78
- var UnsupportedPlatformError = /** @class */ (function (_super) {
79
- __extends(UnsupportedPlatformError, _super);
80
- function UnsupportedPlatformError() {
81
- var _this = _super.call(this, "This method is not available in the current platform.") || this;
82
- // Set the prototype explicitly.
83
- Object.setPrototypeOf(_this, UnsupportedPlatformError.prototype);
84
- return _this;
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
85
7
  }
86
- return UnsupportedPlatformError;
87
- }(Error));
88
- exports.UnsupportedPlatformError = UnsupportedPlatformError;
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ // This file is kept to keep backwards compatibility to any possible users using this file directly
18
+ __exportStar(require("@revenuecat/purchases-typescript-internal/dist/errors"), exports);