@revenuecat/purchases-typescript-internal 10.5.0 → 10.6.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.
@@ -2,19 +2,41 @@ import { CustomerInfo, PurchasesStoreTransaction } from './customerInfo';
2
2
  import { LOG_LEVEL } from './enums';
3
3
  /**
4
4
  * Listener used on updated customer info
5
- * @callback CustomerInfoUpdateListener
6
- * @param {Object} customerInfo Object containing info for the customer
5
+ * @public
6
+ * @param customerInfo - Object containing info for the customer
7
7
  */
8
8
  export type CustomerInfoUpdateListener = (customerInfo: CustomerInfo) => void;
9
+ /**
10
+ * Listener used to determine if a user should be able to purchase a promo product.
11
+ * @public
12
+ */
9
13
  export type ShouldPurchasePromoProductListener = (deferredPurchase: () => Promise<MakePurchaseResult>) => void;
14
+ /**
15
+ * Result of a successful purchase
16
+ * @public
17
+ */
10
18
  export type MakePurchaseResult = {
19
+ /**
20
+ * The product identifier of the purchased product
21
+ */
11
22
  productIdentifier: string;
23
+ /**
24
+ * The Customer Info for the user.
25
+ */
12
26
  customerInfo: CustomerInfo;
27
+ /**
28
+ * The transaction object for the purchase
29
+ */
13
30
  transaction: PurchasesStoreTransaction;
14
31
  };
32
+ /**
33
+ * Listener used to receive log messages from the SDK.
34
+ * @public
35
+ */
15
36
  export type LogHandler = (logLevel: LOG_LEVEL, message: string) => void;
16
37
  /**
17
38
  * Holds the logIn result
39
+ * @public
18
40
  */
19
41
  export interface LogInResult {
20
42
  /**
@@ -1,6 +1,7 @@
1
1
  import { VERIFICATION_RESULT } from "./enums";
2
2
  /**
3
3
  * The EntitlementInfo object gives you access to all of the information about the status of a user entitlement.
4
+ * @public
4
5
  */
5
6
  export interface PurchasesEntitlementInfo {
6
7
  /**
@@ -64,27 +65,27 @@ export interface PurchasesEntitlementInfo {
64
65
  /**
65
66
  * The date an unsubscribe was detected in ISO8601 format. Can be `null`.
66
67
  *
67
- * @note: Entitlement may still be active even if user has unsubscribed. Check the `isActive` property.
68
+ * Entitlement may still be active even if user has unsubscribed. Check the `isActive` property.
68
69
  */
69
70
  readonly unsubscribeDetectedAt: string | null;
70
71
  /**
71
72
  * The date an unsubscribe was detected in milliseconds. Can be `null`.
72
73
  *
73
- * @note: Entitlement may still be active even if user has unsubscribed. Check the `isActive` property.
74
+ * Entitlement may still be active even if user has unsubscribed. Check the `isActive` property.
74
75
  */
75
76
  readonly unsubscribeDetectedAtMillis: number | null;
76
77
  /**
77
78
  * The date a billing issue was detected in ISO8601 format. Can be `null` if there is no billing issue or an
78
79
  * issue has been resolved
79
80
  *
80
- * @note: Entitlement may still be active even if there is a billing issue. Check the `isActive` property.
81
+ * Entitlement may still be active even if there is a billing issue. Check the `isActive` property.
81
82
  */
82
83
  readonly billingIssueDetectedAt: string | null;
83
84
  /**
84
85
  * The date a billing issue was detected in milliseconds. Can be `null` if there is no billing issue or an
85
86
  * issue has been resolved
86
87
  *
87
- * @note: Entitlement may still be active even if there is a billing issue. Check the `isActive` property.
88
+ * Entitlement may still be active even if there is a billing issue. Check the `isActive` property.
88
89
  */
89
90
  readonly billingIssueDetectedAtMillis: number | null;
90
91
  /**
@@ -101,6 +102,7 @@ export interface PurchasesEntitlementInfo {
101
102
  }
102
103
  /**
103
104
  * Contains all the entitlements associated to the user.
105
+ * @public
104
106
  */
105
107
  export interface PurchasesEntitlementInfos {
106
108
  /**
@@ -120,6 +122,10 @@ export interface PurchasesEntitlementInfos {
120
122
  */
121
123
  readonly verification: VERIFICATION_RESULT;
122
124
  }
125
+ /**
126
+ * Type containing all information regarding the customer
127
+ * @public
128
+ */
123
129
  export interface CustomerInfo {
124
130
  /**
125
131
  * Entitlements attached to this customer info
@@ -183,11 +189,15 @@ export interface CustomerInfo {
183
189
  * If there are multiple for different platforms, it will point to the device store.
184
190
  */
185
191
  readonly managementURL: string | null;
192
+ /**
193
+ * List of all non subscription transactions. Use this to fetch the history of
194
+ * non-subscription purchases
195
+ */
186
196
  readonly nonSubscriptionTransactions: PurchasesStoreTransaction[];
187
197
  }
188
198
  /**
189
- * List of all non subscription transactions. Use this to fetch the history of
190
- * non-subscription purchases
199
+ * Represents a non-subscription transaction in the Store.
200
+ * @public
191
201
  */
192
202
  export interface PurchasesStoreTransaction {
193
203
  /**
package/dist/enums.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  /**
2
- * @deprecated, use PRODUCT_CATEGORY
2
+ * @deprecated Use PRODUCT_CATEGORY
3
+ * @public
3
4
  */
4
5
  export declare enum PURCHASE_TYPE {
5
6
  /**
@@ -15,6 +16,7 @@ export declare enum PURCHASE_TYPE {
15
16
  * Enum for billing features.
16
17
  * Currently, these are only relevant for Google Play Android users:
17
18
  * https://developer.android.com/reference/com/android/billingclient/api/BillingClient.FeatureType
19
+ * @public
18
20
  */
19
21
  export declare enum BILLING_FEATURE {
20
22
  /**
@@ -38,6 +40,10 @@ export declare enum BILLING_FEATURE {
38
40
  */
39
41
  PRICE_CHANGE_CONFIRMATION = 4
40
42
  }
43
+ /**
44
+ * Enum for possible refund request results.
45
+ * @public
46
+ */
41
47
  export declare enum REFUND_REQUEST_STATUS {
42
48
  /**
43
49
  * Apple has received the refund request.
@@ -52,6 +58,10 @@ export declare enum REFUND_REQUEST_STATUS {
52
58
  */
53
59
  ERROR = 2
54
60
  }
61
+ /**
62
+ * Enum for possible log levels to print.
63
+ * @public
64
+ */
55
65
  export declare enum LOG_LEVEL {
56
66
  VERBOSE = "VERBOSE",
57
67
  DEBUG = "DEBUG",
@@ -64,6 +74,7 @@ export declare enum LOG_LEVEL {
64
74
  * This can be used if you disable automatic in-app message from showing automatically.
65
75
  * Then, you can pass what type of messages you want to show in the `showInAppMessages`
66
76
  * method in Purchases.
77
+ * @public
67
78
  */
68
79
  export declare enum IN_APP_MESSAGE_TYPE {
69
80
  /**
@@ -82,6 +93,7 @@ export declare enum IN_APP_MESSAGE_TYPE {
82
93
  }
83
94
  /**
84
95
  * Enum of entitlement verification modes.
96
+ * @public
85
97
  */
86
98
  export declare enum ENTITLEMENT_VERIFICATION_MODE {
87
99
  /**
@@ -109,6 +121,8 @@ export declare enum ENTITLEMENT_VERIFICATION_MODE {
109
121
  *
110
122
  * - Note: Verification is only performed if enabled using PurchasesConfiguration's
111
123
  * entitlementVerificationMode property. This is disabled by default.
124
+ *
125
+ * @public
112
126
  */
113
127
  export declare enum VERIFICATION_RESULT {
114
128
  /**
@@ -133,6 +147,8 @@ export declare enum VERIFICATION_RESULT {
133
147
  /**
134
148
  * The result of presenting a paywall. This will be the last situation the user experienced before the
135
149
  * paywall closed.
150
+ *
151
+ * @public
136
152
  */
137
153
  export declare enum PAYWALL_RESULT {
138
154
  /**
package/dist/enums.js CHANGED
@@ -2,7 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PAYWALL_RESULT = exports.VERIFICATION_RESULT = exports.ENTITLEMENT_VERIFICATION_MODE = exports.IN_APP_MESSAGE_TYPE = exports.LOG_LEVEL = exports.REFUND_REQUEST_STATUS = exports.BILLING_FEATURE = exports.PURCHASE_TYPE = void 0;
4
4
  /**
5
- * @deprecated, use PRODUCT_CATEGORY
5
+ * @deprecated Use PRODUCT_CATEGORY
6
+ * @public
6
7
  */
7
8
  var PURCHASE_TYPE;
8
9
  (function (PURCHASE_TYPE) {
@@ -19,6 +20,7 @@ var PURCHASE_TYPE;
19
20
  * Enum for billing features.
20
21
  * Currently, these are only relevant for Google Play Android users:
21
22
  * https://developer.android.com/reference/com/android/billingclient/api/BillingClient.FeatureType
23
+ * @public
22
24
  */
23
25
  var BILLING_FEATURE;
24
26
  (function (BILLING_FEATURE) {
@@ -43,6 +45,10 @@ var BILLING_FEATURE;
43
45
  */
44
46
  BILLING_FEATURE[BILLING_FEATURE["PRICE_CHANGE_CONFIRMATION"] = 4] = "PRICE_CHANGE_CONFIRMATION";
45
47
  })(BILLING_FEATURE || (exports.BILLING_FEATURE = BILLING_FEATURE = {}));
48
+ /**
49
+ * Enum for possible refund request results.
50
+ * @public
51
+ */
46
52
  var REFUND_REQUEST_STATUS;
47
53
  (function (REFUND_REQUEST_STATUS) {
48
54
  /**
@@ -58,6 +64,10 @@ var REFUND_REQUEST_STATUS;
58
64
  */
59
65
  REFUND_REQUEST_STATUS[REFUND_REQUEST_STATUS["ERROR"] = 2] = "ERROR";
60
66
  })(REFUND_REQUEST_STATUS || (exports.REFUND_REQUEST_STATUS = REFUND_REQUEST_STATUS = {}));
67
+ /**
68
+ * Enum for possible log levels to print.
69
+ * @public
70
+ */
61
71
  var LOG_LEVEL;
62
72
  (function (LOG_LEVEL) {
63
73
  LOG_LEVEL["VERBOSE"] = "VERBOSE";
@@ -71,6 +81,7 @@ var LOG_LEVEL;
71
81
  * This can be used if you disable automatic in-app message from showing automatically.
72
82
  * Then, you can pass what type of messages you want to show in the `showInAppMessages`
73
83
  * method in Purchases.
84
+ * @public
74
85
  */
75
86
  var IN_APP_MESSAGE_TYPE;
76
87
  (function (IN_APP_MESSAGE_TYPE) {
@@ -91,6 +102,7 @@ var IN_APP_MESSAGE_TYPE;
91
102
  })(IN_APP_MESSAGE_TYPE || (exports.IN_APP_MESSAGE_TYPE = IN_APP_MESSAGE_TYPE = {}));
92
103
  /**
93
104
  * Enum of entitlement verification modes.
105
+ * @public
94
106
  */
95
107
  var ENTITLEMENT_VERIFICATION_MODE;
96
108
  (function (ENTITLEMENT_VERIFICATION_MODE) {
@@ -121,6 +133,8 @@ var ENTITLEMENT_VERIFICATION_MODE;
121
133
  *
122
134
  * - Note: Verification is only performed if enabled using PurchasesConfiguration's
123
135
  * entitlementVerificationMode property. This is disabled by default.
136
+ *
137
+ * @public
124
138
  */
125
139
  var VERIFICATION_RESULT;
126
140
  (function (VERIFICATION_RESULT) {
@@ -146,6 +160,8 @@ var VERIFICATION_RESULT;
146
160
  /**
147
161
  * The result of presenting a paywall. This will be the last situation the user experienced before the
148
162
  * paywall closed.
163
+ *
164
+ * @public
149
165
  */
150
166
  var PAYWALL_RESULT;
151
167
  (function (PAYWALL_RESULT) {
package/dist/errors.d.ts CHANGED
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Error codes indicating the reason for an error.
3
+ * @public
4
+ */
1
5
  export declare enum PURCHASES_ERROR_CODE {
2
6
  UNKNOWN_ERROR = "0",
3
7
  PURCHASE_CANCELLED_ERROR = "1",
@@ -35,14 +39,28 @@ export declare enum PURCHASES_ERROR_CODE {
35
39
  INVALID_PROMOTIONAL_OFFER_ERROR = "34",
36
40
  OFFLINE_CONNECTION_ERROR = "35"
37
41
  }
42
+ /**
43
+ * Type encapsulating an error in an SDK operation.
44
+ * @public
45
+ */
38
46
  export interface PurchasesError {
39
47
  code: PURCHASES_ERROR_CODE;
40
48
  message: string;
49
+ /**
50
+ * @deprecated access readableErrorCode through userInfo.readableErrorCode
51
+ */
41
52
  readableErrorCode: string;
42
53
  userInfo: ErrorInfo;
43
54
  underlyingErrorMessage: string;
55
+ /**
56
+ * @deprecated use code === Purchases.PURCHASES_ERROR_CODE.PURCHASE_CANCELLED_ERROR instead
57
+ */
44
58
  userCancelled: boolean | null;
45
59
  }
60
+ /**
61
+ * Type encapsulating extra info on an error in an SDK operation.
62
+ * @public
63
+ */
46
64
  export interface ErrorInfo {
47
65
  readableErrorCode: string;
48
66
  }
package/dist/errors.js CHANGED
@@ -17,7 +17,10 @@ var __extends = (this && this.__extends) || (function () {
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.UnsupportedPlatformError = exports.UninitializedPurchasesError = exports.PURCHASES_ERROR_CODE = void 0;
19
19
  /* tslint:disable:max-classes-per-file */
20
- // Error codes indicating the reason for an error.
20
+ /**
21
+ * Error codes indicating the reason for an error.
22
+ * @public
23
+ */
21
24
  var PURCHASES_ERROR_CODE;
22
25
  (function (PURCHASES_ERROR_CODE) {
23
26
  PURCHASES_ERROR_CODE["UNKNOWN_ERROR"] = "0";
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Enum indicating possible package types.
3
+ * @public
4
+ */
1
5
  export declare enum PACKAGE_TYPE {
2
6
  /**
3
7
  * A package that was defined with a custom identifier.
@@ -36,6 +40,10 @@ export declare enum PACKAGE_TYPE {
36
40
  */
37
41
  WEEKLY = "WEEKLY"
38
42
  }
43
+ /**
44
+ * Enum indicating possible eligibility status for introductory pricing.
45
+ * @public
46
+ */
39
47
  export declare enum INTRO_ELIGIBILITY_STATUS {
40
48
  /**
41
49
  * RevenueCat doesn't have enough information to determine eligibility.
@@ -54,6 +62,10 @@ export declare enum INTRO_ELIGIBILITY_STATUS {
54
62
  */
55
63
  INTRO_ELIGIBILITY_STATUS_NO_INTRO_OFFER_EXISTS = 3
56
64
  }
65
+ /**
66
+ * Type representing a product from the Store.
67
+ * @public
68
+ */
57
69
  export interface PurchasesStoreProduct {
58
70
  /**
59
71
  * Product Id.
@@ -118,7 +130,7 @@ export interface PurchasesStoreProduct {
118
130
  /**
119
131
  * Offering identifier the store product was presented from.
120
132
  * Null if not using offerings or if fetched directly from store via getProducts.
121
- * @deprecated, use presentedOfferingContext
133
+ * @deprecated Use presentedOfferingContext
122
134
  */
123
135
  readonly presentedOfferingIdentifier: string | null;
124
136
  /**
@@ -127,6 +139,10 @@ export interface PurchasesStoreProduct {
127
139
  */
128
140
  readonly presentedOfferingContext: PresentedOfferingContext | null;
129
141
  }
142
+ /**
143
+ * Enum indicating possible product categories.
144
+ * @public
145
+ */
130
146
  export declare enum PRODUCT_CATEGORY {
131
147
  /**
132
148
  * A type of product for non-subscription.
@@ -141,6 +157,10 @@ export declare enum PRODUCT_CATEGORY {
141
157
  */
142
158
  UNKNOWN = "UNKNOWN"
143
159
  }
160
+ /**
161
+ * Enum indicating possible product types.
162
+ * @public
163
+ */
144
164
  export declare enum PRODUCT_TYPE {
145
165
  /**
146
166
  * A consumable in-app purchase.
@@ -167,6 +187,10 @@ export declare enum PRODUCT_TYPE {
167
187
  */
168
188
  UNKNOWN = "UNKNOWN"
169
189
  }
190
+ /**
191
+ * Contains information about a discount offer for a product
192
+ * @public
193
+ */
170
194
  export interface PurchasesStoreProductDiscount {
171
195
  /**
172
196
  * Identifier of the discount.
@@ -197,6 +221,10 @@ export interface PurchasesStoreProductDiscount {
197
221
  */
198
222
  readonly periodNumberOfUnits: number;
199
223
  }
224
+ /**
225
+ * Contains information about the introductory price for a product
226
+ * @public
227
+ */
200
228
  export interface PurchasesIntroPrice {
201
229
  /**
202
230
  * Price in the local currency.
@@ -226,6 +254,7 @@ export interface PurchasesIntroPrice {
226
254
  /**
227
255
  * Contains information about the product available for the user to purchase.
228
256
  * For more info see https://docs.revenuecat.com/docs/entitlements
257
+ * @public
229
258
  */
230
259
  export interface PurchasesPackage {
231
260
  /**
@@ -242,7 +271,7 @@ export interface PurchasesPackage {
242
271
  readonly product: PurchasesStoreProduct;
243
272
  /**
244
273
  * Offering this package belongs to.
245
- * @deprecated, use presentedOfferingContext
274
+ * @deprecated Use presentedOfferingContext
246
275
  */
247
276
  readonly offeringIdentifier: string;
248
277
  /**
@@ -253,6 +282,7 @@ export interface PurchasesPackage {
253
282
  }
254
283
  /**
255
284
  * Contains data about the context in which an offering was presented.
285
+ * @public
256
286
  */
257
287
  export interface PresentedOfferingContext {
258
288
  /**
@@ -270,6 +300,7 @@ export interface PresentedOfferingContext {
270
300
  }
271
301
  /**
272
302
  * Contains data about the context in which an offering was presented.
303
+ * @public
273
304
  */
274
305
  export interface PresentedOfferingTargetingContext {
275
306
  /**
@@ -284,6 +315,7 @@ export interface PresentedOfferingTargetingContext {
284
315
  /**
285
316
  * An offering is a collection of Packages (`PurchasesPackage`) available for the user to purchase.
286
317
  * For more info see https://docs.revenuecat.com/docs/entitlements
318
+ * @public
287
319
  */
288
320
  export interface PurchasesOffering {
289
321
  /**
@@ -339,6 +371,7 @@ export interface PurchasesOffering {
339
371
  /**
340
372
  * Contains all the offerings configured in RevenueCat dashboard.
341
373
  * For more info see https://docs.revenuecat.com/docs/entitlements
374
+ * @public
342
375
  */
343
376
  export interface PurchasesOfferings {
344
377
  /**
@@ -354,7 +387,8 @@ export interface PurchasesOfferings {
354
387
  }
355
388
  /**
356
389
  * Holds the information used when upgrading from another sku. For Android use only.
357
- * @deprecated, use GoogleProductChangeInfo
390
+ * @deprecated Use GoogleProductChangeInfo
391
+ * @public
358
392
  */
359
393
  export interface UpgradeInfo {
360
394
  /**
@@ -368,6 +402,7 @@ export interface UpgradeInfo {
368
402
  }
369
403
  /**
370
404
  * Holds the information used when upgrading from another sku. For Android use only.
405
+ * @public
371
406
  */
372
407
  export interface GoogleProductChangeInfo {
373
408
  /**
@@ -381,6 +416,7 @@ export interface GoogleProductChangeInfo {
381
416
  }
382
417
  /**
383
418
  * Holds the introductory price status
419
+ * @public
384
420
  */
385
421
  export interface IntroEligibility {
386
422
  /**
@@ -392,6 +428,10 @@ export interface IntroEligibility {
392
428
  */
393
429
  readonly description: string;
394
430
  }
431
+ /**
432
+ * Holds the information about a PromotionalOffer in Apple's App Store.
433
+ * @public
434
+ */
395
435
  export interface PurchasesPromotionalOffer {
396
436
  readonly identifier: string;
397
437
  readonly keyIdentifier: string;
@@ -399,6 +439,10 @@ export interface PurchasesPromotionalOffer {
399
439
  readonly signature: string;
400
440
  readonly timestamp: number;
401
441
  }
442
+ /**
443
+ * Enum with possible proration modes in a subscription upgrade or downgrade in the Play Store. Used only for Google.
444
+ * @public
445
+ */
402
446
  export declare enum PRORATION_MODE {
403
447
  UNKNOWN_SUBSCRIPTION_UPGRADE_DOWNGRADE_POLICY = 0,
404
448
  /**
@@ -427,22 +471,23 @@ export declare enum PRORATION_MODE {
427
471
  /**
428
472
  * Contains all details associated with a SubscriptionOption
429
473
  * Used only for Google
474
+ * @public
430
475
  */
431
476
  export interface SubscriptionOption {
432
477
  /**
433
478
  * Identifier of the subscription option
434
479
  * If this SubscriptionOption represents a base plan, this will be the basePlanId.
435
- * If it represents an offer, it will be {basePlanId}:{offerId}
480
+ * If it represents an offer, it will be basePlanId:offerId
436
481
  */
437
482
  readonly id: string;
438
483
  /**
439
484
  * Identifier of the StoreProduct associated with this SubscriptionOption
440
- * This will be {subId}:{basePlanId}
485
+ * This will be subId:basePlanId
441
486
  */
442
487
  readonly storeProductId: string;
443
488
  /**
444
489
  * Identifer of the subscription associated with this SubscriptionOption
445
- * This will be {subId}
490
+ * This will be subId
446
491
  */
447
492
  readonly productId: string;
448
493
  /**
@@ -484,7 +529,7 @@ export interface SubscriptionOption {
484
529
  readonly introPhase: PricingPhase | null;
485
530
  /**
486
531
  * Offering identifier the subscription option was presented from
487
- * @deprecated, use presentedOfferingContext
532
+ * @deprecated Use presentedOfferingContext
488
533
  */
489
534
  readonly presentedOfferingIdentifier: string | null;
490
535
  /**
@@ -495,6 +540,7 @@ export interface SubscriptionOption {
495
540
  }
496
541
  /**
497
542
  * Contains all the details associated with a PricingPhase
543
+ * @public
498
544
  */
499
545
  export interface PricingPhase {
500
546
  /**
@@ -521,6 +567,7 @@ export interface PricingPhase {
521
567
  }
522
568
  /**
523
569
  * Recurrence mode for a pricing phase
570
+ * @public
524
571
  */
525
572
  export declare enum RECURRENCE_MODE {
526
573
  /**
@@ -538,6 +585,7 @@ export declare enum RECURRENCE_MODE {
538
585
  }
539
586
  /**
540
587
  * Payment mode for offer pricing phases. Google Play only.
588
+ * @public
541
589
  */
542
590
  export declare enum OFFER_PAYMENT_MODE {
543
591
  /**
@@ -555,6 +603,7 @@ export declare enum OFFER_PAYMENT_MODE {
555
603
  }
556
604
  /**
557
605
  * Contains all the details associated with a Price
606
+ * @public
558
607
  */
559
608
  export interface Price {
560
609
  /**
@@ -578,6 +627,7 @@ export interface Price {
578
627
  }
579
628
  /**
580
629
  * Contains all the details associated with a Period
630
+ * @public
581
631
  */
582
632
  export interface Period {
583
633
  /**
@@ -597,6 +647,7 @@ export interface Period {
597
647
  }
598
648
  /**
599
649
  * Time duration unit for Period.
650
+ * @public
600
651
  */
601
652
  export declare enum PERIOD_UNIT {
602
653
  DAY = "DAY",
package/dist/offerings.js CHANGED
@@ -1,6 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PERIOD_UNIT = exports.OFFER_PAYMENT_MODE = exports.RECURRENCE_MODE = exports.PRORATION_MODE = exports.PRODUCT_TYPE = exports.PRODUCT_CATEGORY = exports.INTRO_ELIGIBILITY_STATUS = exports.PACKAGE_TYPE = void 0;
4
+ /**
5
+ * Enum indicating possible package types.
6
+ * @public
7
+ */
4
8
  var PACKAGE_TYPE;
5
9
  (function (PACKAGE_TYPE) {
6
10
  /**
@@ -40,6 +44,10 @@ var PACKAGE_TYPE;
40
44
  */
41
45
  PACKAGE_TYPE["WEEKLY"] = "WEEKLY";
42
46
  })(PACKAGE_TYPE || (exports.PACKAGE_TYPE = PACKAGE_TYPE = {}));
47
+ /**
48
+ * Enum indicating possible eligibility status for introductory pricing.
49
+ * @public
50
+ */
43
51
  var INTRO_ELIGIBILITY_STATUS;
44
52
  (function (INTRO_ELIGIBILITY_STATUS) {
45
53
  /**
@@ -59,6 +67,10 @@ var INTRO_ELIGIBILITY_STATUS;
59
67
  */
60
68
  INTRO_ELIGIBILITY_STATUS[INTRO_ELIGIBILITY_STATUS["INTRO_ELIGIBILITY_STATUS_NO_INTRO_OFFER_EXISTS"] = 3] = "INTRO_ELIGIBILITY_STATUS_NO_INTRO_OFFER_EXISTS";
61
69
  })(INTRO_ELIGIBILITY_STATUS || (exports.INTRO_ELIGIBILITY_STATUS = INTRO_ELIGIBILITY_STATUS = {}));
70
+ /**
71
+ * Enum indicating possible product categories.
72
+ * @public
73
+ */
62
74
  var PRODUCT_CATEGORY;
63
75
  (function (PRODUCT_CATEGORY) {
64
76
  /**
@@ -74,6 +86,10 @@ var PRODUCT_CATEGORY;
74
86
  */
75
87
  PRODUCT_CATEGORY["UNKNOWN"] = "UNKNOWN";
76
88
  })(PRODUCT_CATEGORY || (exports.PRODUCT_CATEGORY = PRODUCT_CATEGORY = {}));
89
+ /**
90
+ * Enum indicating possible product types.
91
+ * @public
92
+ */
77
93
  var PRODUCT_TYPE;
78
94
  (function (PRODUCT_TYPE) {
79
95
  /**
@@ -101,6 +117,10 @@ var PRODUCT_TYPE;
101
117
  */
102
118
  PRODUCT_TYPE["UNKNOWN"] = "UNKNOWN";
103
119
  })(PRODUCT_TYPE || (exports.PRODUCT_TYPE = PRODUCT_TYPE = {}));
120
+ /**
121
+ * Enum with possible proration modes in a subscription upgrade or downgrade in the Play Store. Used only for Google.
122
+ * @public
123
+ */
104
124
  var PRORATION_MODE;
105
125
  (function (PRORATION_MODE) {
106
126
  PRORATION_MODE[PRORATION_MODE["UNKNOWN_SUBSCRIPTION_UPGRADE_DOWNGRADE_POLICY"] = 0] = "UNKNOWN_SUBSCRIPTION_UPGRADE_DOWNGRADE_POLICY";
@@ -129,6 +149,7 @@ var PRORATION_MODE;
129
149
  })(PRORATION_MODE || (exports.PRORATION_MODE = PRORATION_MODE = {}));
130
150
  /**
131
151
  * Recurrence mode for a pricing phase
152
+ * @public
132
153
  */
133
154
  var RECURRENCE_MODE;
134
155
  (function (RECURRENCE_MODE) {
@@ -147,6 +168,7 @@ var RECURRENCE_MODE;
147
168
  })(RECURRENCE_MODE || (exports.RECURRENCE_MODE = RECURRENCE_MODE = {}));
148
169
  /**
149
170
  * Payment mode for offer pricing phases. Google Play only.
171
+ * @public
150
172
  */
151
173
  var OFFER_PAYMENT_MODE;
152
174
  (function (OFFER_PAYMENT_MODE) {
@@ -165,6 +187,7 @@ var OFFER_PAYMENT_MODE;
165
187
  })(OFFER_PAYMENT_MODE || (exports.OFFER_PAYMENT_MODE = OFFER_PAYMENT_MODE = {}));
166
188
  /**
167
189
  * Time duration unit for Period.
190
+ * @public
168
191
  */
169
192
  var PERIOD_UNIT;
170
193
  (function (PERIOD_UNIT) {
@@ -1,6 +1,7 @@
1
1
  import { ENTITLEMENT_VERIFICATION_MODE } from "./enums";
2
2
  /**
3
3
  * Holds parameters to initialize the SDK.
4
+ * @public
4
5
  */
5
6
  export interface PurchasesConfiguration {
6
7
  /**
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": "10.5.0",
4
+ "version": "10.6.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",
@@ -14,7 +14,8 @@
14
14
  "apitests": "tsc --p apitesters/",
15
15
  "lint": "eslint",
16
16
  "build": "tsc",
17
- "build-watch": "tsc --watch"
17
+ "build-watch": "tsc --watch",
18
+ "extract-api": "api-extractor run --local --verbose"
18
19
  },
19
20
  "repository": {
20
21
  "type": "git",
@@ -30,6 +31,7 @@
30
31
  },
31
32
  "homepage": "https://github.com/RevenueCat/purchases-hybrid-common#readme",
32
33
  "devDependencies": {
34
+ "@microsoft/api-extractor": "^7.43.1",
33
35
  "@typescript-eslint/eslint-plugin": "^5.61.0",
34
36
  "@typescript-eslint/parser": "^5.61.0",
35
37
  "eslint": "^8.44.0",