@revenuecat/purchases-typescript-internal-esm 13.21.0 → 13.22.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.
- package/dist/customerInfo.d.ts +94 -2
- package/package.json +1 -1
package/dist/customerInfo.d.ts
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
import { VERIFICATION_RESULT } from "./enums";
|
|
2
|
+
/**
|
|
3
|
+
* The supported stores for purchases.
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export type Store = "PLAY_STORE" | "APP_STORE" | "STRIPE" | "MAC_APP_STORE" | "PROMOTIONAL" | "AMAZON" | "RC_BILLING" | "EXTERNAL" | "UNKNOWN_STORE";
|
|
7
|
+
/**
|
|
8
|
+
* The supported ownership types for an entitlement.
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export type OwnershipType = "PURCHASED" | "FAMILY_SHARED" | "UNKNOWN";
|
|
12
|
+
/**
|
|
13
|
+
* The supported period types for an entitlement.
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
export type PeriodType = "NORMAL" | "INTRO" | "TRIAL" | "PREPAID";
|
|
2
17
|
/**
|
|
3
18
|
* The EntitlementInfo object gives you access to all of the information about the status of a user entitlement.
|
|
4
19
|
* @public
|
|
@@ -49,7 +64,7 @@ export interface PurchasesEntitlementInfo {
|
|
|
49
64
|
/**
|
|
50
65
|
* The store where this entitlement was unlocked from.
|
|
51
66
|
*/
|
|
52
|
-
readonly store:
|
|
67
|
+
readonly store: Store;
|
|
53
68
|
/**
|
|
54
69
|
* The product identifier that unlocked this entitlement
|
|
55
70
|
*/
|
|
@@ -94,7 +109,7 @@ export interface PurchasesEntitlementInfo {
|
|
|
94
109
|
* FAMILY_SHARED if the purchase has been shared to this user by a family member.
|
|
95
110
|
* UNKNOWN if the purchase has no or an unknown ownership type.
|
|
96
111
|
*/
|
|
97
|
-
readonly ownershipType:
|
|
112
|
+
readonly ownershipType: OwnershipType;
|
|
98
113
|
/**
|
|
99
114
|
* If entitlement verification was enabled, the result of that verification. If not, VerificationResult.NOT_REQUESTED
|
|
100
115
|
*/
|
|
@@ -213,3 +228,80 @@ export interface PurchasesStoreTransaction {
|
|
|
213
228
|
*/
|
|
214
229
|
purchaseDate: string;
|
|
215
230
|
}
|
|
231
|
+
/**
|
|
232
|
+
* Subscription purchases of the Customer.
|
|
233
|
+
* @public
|
|
234
|
+
*/
|
|
235
|
+
export interface PurchasesSubscriptionInfo {
|
|
236
|
+
/**
|
|
237
|
+
* The product identifier.
|
|
238
|
+
*/
|
|
239
|
+
readonly productIdentifier: string;
|
|
240
|
+
/**
|
|
241
|
+
* Date when the last subscription period started.
|
|
242
|
+
*/
|
|
243
|
+
readonly purchaseDate: string;
|
|
244
|
+
/**
|
|
245
|
+
* Date when this subscription first started. This property does not update with renewals.
|
|
246
|
+
* This property also does not update for product changes within a subscription group or
|
|
247
|
+
* re-subscriptions by lapsed subscribers.
|
|
248
|
+
*/
|
|
249
|
+
readonly originalPurchaseDate: string | null;
|
|
250
|
+
/**
|
|
251
|
+
* Date when the subscription expires/expired
|
|
252
|
+
*/
|
|
253
|
+
readonly expiresDate: string | null;
|
|
254
|
+
/**
|
|
255
|
+
* Store where the subscription was purchased.
|
|
256
|
+
*/
|
|
257
|
+
readonly store: Store;
|
|
258
|
+
/**
|
|
259
|
+
* Date when RevenueCat detected that auto-renewal was turned off for this subscription.
|
|
260
|
+
* Note the subscription may still be active, check the `expiresDate` attribute.
|
|
261
|
+
*/
|
|
262
|
+
readonly unsubscribeDetectedAt: string | null;
|
|
263
|
+
/**
|
|
264
|
+
* Whether or not the purchase was made in sandbox mode.
|
|
265
|
+
*/
|
|
266
|
+
readonly isSandbox: boolean;
|
|
267
|
+
/**
|
|
268
|
+
* Date when RevenueCat detected any billing issues with this subscription.
|
|
269
|
+
* If and when the billing issue gets resolved, this field is set to nil.
|
|
270
|
+
*/
|
|
271
|
+
readonly billingIssuesDetectedAt: string | null;
|
|
272
|
+
/**
|
|
273
|
+
* Date when any grace period for this subscription expires/expired.
|
|
274
|
+
* nil if the customer has never been in a grace period.
|
|
275
|
+
*/
|
|
276
|
+
readonly gracePeriodExpiresDate: string | null;
|
|
277
|
+
/**
|
|
278
|
+
* How the Customer received access to this subscription:
|
|
279
|
+
* - [OwnershipType.PURCHASED]: The customer bought the subscription.
|
|
280
|
+
* - [OwnershipType.FAMILY_SHARED]: The Customer has access to the product via their family.
|
|
281
|
+
*/
|
|
282
|
+
readonly ownershipType: OwnershipType;
|
|
283
|
+
/**
|
|
284
|
+
* Type of the current subscription period:
|
|
285
|
+
* - [PeriodType.NORMAL]: The product is in a normal period (default)
|
|
286
|
+
* - [PeriodType.TRIAL]: The product is in a free trial period
|
|
287
|
+
* - [PeriodType.INTRO]: The product is in an introductory pricing period
|
|
288
|
+
* - [PeriodType.PREPAID]: The product is in a prepaid pricing period
|
|
289
|
+
*/
|
|
290
|
+
readonly periodType: PeriodType;
|
|
291
|
+
/**
|
|
292
|
+
* Date when RevenueCat detected a refund of this subscription.
|
|
293
|
+
*/
|
|
294
|
+
readonly refundedAt: string | null;
|
|
295
|
+
/**
|
|
296
|
+
* The transaction id in the store of the subscription.
|
|
297
|
+
*/
|
|
298
|
+
readonly storeTransactionId: string | null;
|
|
299
|
+
/**
|
|
300
|
+
* Whether the subscription is currently active.
|
|
301
|
+
*/
|
|
302
|
+
readonly isActive: boolean;
|
|
303
|
+
/**
|
|
304
|
+
* Whether the subscription will renew at the next billing period.
|
|
305
|
+
*/
|
|
306
|
+
readonly willRenew: boolean;
|
|
307
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@revenuecat/purchases-typescript-internal-esm",
|
|
3
3
|
"title": "Purchases typescript internal shared code",
|
|
4
|
-
"version": "13.
|
|
4
|
+
"version": "13.22.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",
|