react-native-iap 9.0.0-beta2 → 9.0.0-beta3

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.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-iap",
3
- "version": "9.0.0-beta2",
3
+ "version": "9.0.0-beta3",
4
4
  "packageManager": "yarn@3.2.0",
5
5
  "description": "React Native In App Purchase Module.",
6
6
  "main": "index.js",
package/src/iap.js CHANGED
@@ -148,13 +148,15 @@ var fillProductsAdditionalData = function (products) { return __awaiter(void 0,
148
148
  export var getProducts = function (skus) {
149
149
  return (Platform.select({
150
150
  ios: function () { return __awaiter(void 0, void 0, void 0, function () {
151
+ var products;
151
152
  return __generator(this, function (_a) {
152
153
  switch (_a.label) {
153
- case 0: return [4 /*yield*/, getIosModule()
154
- .getItems(skus)
155
- .filter(function (item) { return skus.includes(item.productId); })
156
- .filter(function (item) { return item.type === 'iap'; })];
157
- case 1: return [2 /*return*/, _a.sent()];
154
+ case 0: return [4 /*yield*/, getIosModule().getItems(skus)];
155
+ case 1:
156
+ products = _a.sent();
157
+ return [2 /*return*/, products.filter(function (item) {
158
+ return skus.includes(item.productId) && item.type === 'iap';
159
+ })];
158
160
  }
159
161
  });
160
162
  }); },
@@ -179,13 +181,15 @@ export var getProducts = function (skus) {
179
181
  export var getSubscriptions = function (skus) {
180
182
  return (Platform.select({
181
183
  ios: function () { return __awaiter(void 0, void 0, void 0, function () {
184
+ var subscriptions;
182
185
  return __generator(this, function (_a) {
183
186
  switch (_a.label) {
184
- case 0: return [4 /*yield*/, getIosModule()
185
- .getItems(skus)
186
- .filter(function (item) { return skus.includes(item.productId); })
187
- .filter(function (item) { return item.type === 'subs'; })];
188
- case 1: return [2 /*return*/, _a.sent()];
187
+ case 0: return [4 /*yield*/, getIosModule().getItems(skus)];
188
+ case 1:
189
+ subscriptions = _a.sent();
190
+ return [2 /*return*/, subscriptions.filter(function (item) {
191
+ return skus.includes(item.productId) && item.type === 'subs';
192
+ })];
189
193
  }
190
194
  });
191
195
  }); },
@@ -62,28 +62,6 @@ export interface ProductPurchase {
62
62
  developerPayloadAndroid?: string;
63
63
  obfuscatedAccountIdAndroid?: string;
64
64
  obfuscatedProfileIdAndroid?: string;
65
- title?: string;
66
- description?: string;
67
- productType?: string;
68
- name?: string;
69
- oneTimePurchaseOfferDetails?: {
70
- priceCurrencyCode?: string;
71
- formattedPrice?: string;
72
- priceAmountMicros?: string;
73
- }[];
74
- subscriptionOfferDetails?: {
75
- offerToken?: string[];
76
- pricingPhases: {
77
- pricingPhaseList: {
78
- formattedPrice?: string;
79
- priceCurrencyCode?: string;
80
- billingPeriod?: string;
81
- billingCycleCount?: number;
82
- priceAmountMicros?: string;
83
- recurrenceMode?: number;
84
- };
85
- };
86
- }[];
87
65
  userIdAmazon?: string;
88
66
  userMarketplaceAmazon?: string;
89
67
  userJsonAmazon?: string;
@@ -136,6 +114,26 @@ export interface Subscription extends ProductCommon {
136
114
  introductoryPricePeriodAndroid?: string;
137
115
  subscriptionPeriodAndroid?: string;
138
116
  freeTrialPeriodAndroid?: string;
117
+ productType?: string;
118
+ name?: string;
119
+ oneTimePurchaseOfferDetails?: {
120
+ priceCurrencyCode?: string;
121
+ formattedPrice?: string;
122
+ priceAmountMicros?: string;
123
+ }[];
124
+ subscriptionOfferDetails?: {
125
+ offerToken?: string[];
126
+ pricingPhases: {
127
+ pricingPhaseList: {
128
+ formattedPrice?: string;
129
+ priceCurrencyCode?: string;
130
+ billingPeriod?: string;
131
+ billingCycleCount?: number;
132
+ priceAmountMicros?: string;
133
+ recurrenceMode?: number;
134
+ };
135
+ };
136
+ }[];
139
137
  }
140
138
  export interface RequestPurchase {
141
139
  sku: string;