@revenuecat/purchases-capacitor 8.0.0-beta.4 → 9.0.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/docs.json CHANGED
@@ -49,31 +49,6 @@
49
49
  "complexTypes": [],
50
50
  "slug": "setmockwebresults"
51
51
  },
52
- {
53
- "name": "setFinishTransactions",
54
- "signature": "(options: { finishTransactions: boolean; }) => Promise<void>",
55
- "parameters": [
56
- {
57
- "name": "options",
58
- "docs": "Set finishTransactions to false if you aren't using Purchases SDK to\nmake the purchase",
59
- "type": "{ finishTransactions: boolean; }"
60
- }
61
- ],
62
- "returns": "Promise<void>",
63
- "tags": [
64
- {
65
- "name": "param",
66
- "text": "options Set finishTransactions to false if you aren't using Purchases SDK to\nmake the purchase"
67
- },
68
- {
69
- "name": "returns",
70
- "text": "The promise will be rejected if configure has not been called yet."
71
- }
72
- ],
73
- "docs": "",
74
- "complexTypes": [],
75
- "slug": "setfinishtransactions"
76
- },
77
52
  {
78
53
  "name": "setSimulatesAskToBuyInSandbox",
79
54
  "signature": "(options: { simulatesAskToBuyInSandbox: boolean; }) => Promise<void>",
@@ -368,6 +343,29 @@
368
343
  ],
369
344
  "slug": "restorepurchases"
370
345
  },
346
+ {
347
+ "name": "recordPurchase",
348
+ "signature": "(options: { productID: string; }) => Promise<{ transaction: PurchasesStoreTransaction; }>",
349
+ "parameters": [
350
+ {
351
+ "name": "options",
352
+ "docs": "The productID that was purchased that needs to be synced with RevenueCat's backend.",
353
+ "type": "{ productID: string; }"
354
+ }
355
+ ],
356
+ "returns": "Promise<{ transaction: PurchasesStoreTransaction; }>",
357
+ "tags": [
358
+ {
359
+ "name": "param",
360
+ "text": "options The productID that was purchased that needs to be synced with RevenueCat's backend."
361
+ }
362
+ ],
363
+ "docs": "Use this method only if you already have your own IAP implementation using StoreKit 2 and want to use\nRevenueCat's backend. If you are using StoreKit 1 for your implementation, you do not need this method.\n\nYou only need to use this method with *new* purchases. Subscription updates are observed automatically.",
364
+ "complexTypes": [
365
+ "PurchasesStoreTransaction"
366
+ ],
367
+ "slug": "recordpurchase"
368
+ },
371
369
  {
372
370
  "name": "getAppUserID",
373
371
  "signature": "() => Promise<{ appUserID: string; }>",
@@ -516,22 +514,49 @@
516
514
  {
517
515
  "name": "options",
518
516
  "docs": "",
519
- "type": "SyncObserverModeAmazonPurchaseOptions"
517
+ "type": "SyncAmazonPurchaseOptions"
520
518
  }
521
519
  ],
522
520
  "returns": "Promise<void>",
523
521
  "tags": [
522
+ {
523
+ "name": "deprecated",
524
+ "text": "- Use syncAmazonPurchase instead\nThis method will send a purchase to the RevenueCat backend. This function should only be called if you are\nin Amazon observer mode or performing a client side migration of your current users to RevenueCat.\n\nThe receipt IDs are cached if successfully posted, so they are not posted more than once."
525
+ },
524
526
  {
525
527
  "name": "returns",
526
528
  "text": "The promise will be rejected if configure has not been called yet or if there's an error\nsyncing purchases."
527
529
  }
528
530
  ],
529
- "docs": "This method will send a purchase to the RevenueCat backend. This function should only be called if you are\nin Amazon observer mode or performing a client side migration of your current users to RevenueCat.\n\nThe receipt IDs are cached if successfully posted, so they are not posted more than once.",
531
+ "docs": "",
530
532
  "complexTypes": [
531
533
  "SyncObserverModeAmazonPurchaseOptions"
532
534
  ],
533
535
  "slug": "syncobservermodeamazonpurchase"
534
536
  },
537
+ {
538
+ "name": "syncAmazonPurchase",
539
+ "signature": "(options: SyncAmazonPurchaseOptions) => Promise<void>",
540
+ "parameters": [
541
+ {
542
+ "name": "options",
543
+ "docs": "",
544
+ "type": "SyncAmazonPurchaseOptions"
545
+ }
546
+ ],
547
+ "returns": "Promise<void>",
548
+ "tags": [
549
+ {
550
+ "name": "returns",
551
+ "text": "The promise will be rejected if configure has not been called yet or if there's an error\nsyncing purchases."
552
+ }
553
+ ],
554
+ "docs": "This method will send a purchase to the RevenueCat backend. This function should only be called if you are\nin Amazon observer mode or performing a client side migration of your current users to RevenueCat.\n\nThe receipt IDs are cached if successfully posted, so they are not posted more than once.",
555
+ "complexTypes": [
556
+ "SyncAmazonPurchaseOptions"
557
+ ],
558
+ "slug": "syncamazonpurchase"
559
+ },
535
560
  {
536
561
  "name": "enableAdServicesAttributionTokenCollection",
537
562
  "signature": "() => Promise<void>",
@@ -1380,11 +1405,13 @@
1380
1405
  "type": "string | null | undefined"
1381
1406
  },
1382
1407
  {
1383
- "name": "observerMode",
1408
+ "name": "purchasesAreCompletedBy",
1384
1409
  "tags": [],
1385
- "docs": "An optional boolean. Set this to TRUE if you have your own IAP implementation and\nwant to use only RevenueCat's backend. Default is FALSE. If you are on Android and setting this to ON, you will have\nto acknowledge the purchases yourself.",
1386
- "complexTypes": [],
1387
- "type": "boolean | undefined"
1410
+ "docs": "Set this to MY_APP and provide a STOREKIT_VERSION if you have your own IAP implementation and\nwant to only use RevenueCat's backend. Defaults to PURCHASES_ARE_COMPLETED_BY_TYPE.REVENUECAT.\n\nIf you are on Android and setting this to MY_APP, will have to acknowledge the purchases yourself.\nIf your app is only on Android, you may specify any StoreKit version, as it is ignored by the\nAndroid SDK.",
1411
+ "complexTypes": [
1412
+ "PurchasesAreCompletedBy"
1413
+ ],
1414
+ "type": "PurchasesAreCompletedBy"
1388
1415
  },
1389
1416
  {
1390
1417
  "name": "userDefaultsSuiteName",
@@ -1394,16 +1421,13 @@
1394
1421
  "type": "string | undefined"
1395
1422
  },
1396
1423
  {
1397
- "name": "usesStoreKit2IfAvailable",
1398
- "tags": [
1399
- {
1400
- "text": "RevenueCat currently uses StoreKit 1 for purchases, as its stability in production scenarios has\nproven to be more performant than StoreKit 2.\nWe're collecting more data on the best approach, but StoreKit 1 vs StoreKit 2 is an implementation detail\nthat you shouldn't need to care about.\nWe recommend not using this parameter, letting RevenueCat decide for you which StoreKit implementation to use.",
1401
- "name": "deprecated"
1402
- }
1424
+ "name": "storeKitVersion",
1425
+ "tags": [],
1426
+ "docs": "iOS-only, will be ignored for Android.\n\nBy selecting the DEFAULT value, RevenueCat will automatically select the most appropriate StoreKit version\nfor the app's runtime environment.\n\n- Warning: Make sure you have an In-App Purchase Key configured in your app.\nPlease see https://rev.cat/in-app-purchase-key-configuration for more info.\n\n- Note: StoreKit 2 is only available on iOS 16+. StoreKit 1 will be used for previous iOS versions\nregardless of this setting.",
1427
+ "complexTypes": [
1428
+ "STOREKIT_VERSION"
1403
1429
  ],
1404
- "docs": "iOS-only, will be ignored for Android.\nSet this to TRUE to enable StoreKit2.\nDefault is FALSE.",
1405
- "complexTypes": [],
1406
- "type": "boolean | undefined"
1430
+ "type": "STOREKIT_VERSION"
1407
1431
  },
1408
1432
  {
1409
1433
  "name": "useAmazon",
@@ -1427,6 +1451,13 @@
1427
1451
  "ENTITLEMENT_VERIFICATION_MODE"
1428
1452
  ],
1429
1453
  "type": "ENTITLEMENT_VERIFICATION_MODE"
1454
+ },
1455
+ {
1456
+ "name": "pendingTransactionsForPrepaidPlansEnabled",
1457
+ "tags": [],
1458
+ "docs": "Enable this setting if you want to allow pending purchases for prepaid subscriptions (only supported\nin Google Play). Note that entitlements are not granted until payment is done.\nDisabled by default.",
1459
+ "complexTypes": [],
1460
+ "type": "boolean | undefined"
1430
1461
  }
1431
1462
  ]
1432
1463
  },
@@ -2009,6 +2040,48 @@
2009
2040
  "complexTypes": [],
2010
2041
  "type": "string"
2011
2042
  },
2043
+ {
2044
+ "name": "pricePerWeek",
2045
+ "tags": [],
2046
+ "docs": "Null for INAPP products. The price of the PurchasesStoreProduct in a weekly recurrence.\nThis means that, for example, if the period is monthly, the price will be\ndivided by 4. Note that this value may be an approximation. For Google subscriptions,\nthis value will use the basePlan to calculate the value.",
2047
+ "complexTypes": [],
2048
+ "type": "number"
2049
+ },
2050
+ {
2051
+ "name": "pricePerMonth",
2052
+ "tags": [],
2053
+ "docs": "Null for INAPP products. The price of the PurchasesStoreProduct in a monthly recurrence.\nThis means that, for example, if the period is annual, the price will be\ndivided by 12. Note that this value may be an approximation. For Google subscriptions,\nthis value will use the basePlan to calculate the value.",
2054
+ "complexTypes": [],
2055
+ "type": "number"
2056
+ },
2057
+ {
2058
+ "name": "pricePerYear",
2059
+ "tags": [],
2060
+ "docs": "Null for INAPP products. The price of the PurchasesStoreProduct in a yearly recurrence.\nThis means that, for example, if the period is monthly, the price will be multiplied by\n12. Note that this value may be an approximation. For Google subscriptions, this value\nwill use the basePlan to calculate the value.",
2061
+ "complexTypes": [],
2062
+ "type": "number"
2063
+ },
2064
+ {
2065
+ "name": "pricePerWeekString",
2066
+ "tags": [],
2067
+ "docs": "Null for INAPP products. The price of the PurchasesStoreProduct formatted for the current\nlocale in a weekly recurrence. This means that, for example, if the period is monthly,\nthe price will be divided by 4. It uses a currency formatter to format the price in the\ngiven locale. Note that this value may be an approximation. For Google subscriptions,\nthis value will use the basePlan to calculate the value.",
2068
+ "complexTypes": [],
2069
+ "type": "string"
2070
+ },
2071
+ {
2072
+ "name": "pricePerMonthString",
2073
+ "tags": [],
2074
+ "docs": "Null for INAPP products. The price of the PurchasesStoreProduct formatted for the current\nlocale in a monthly recurrence. This means that, for example, if the period is annual,\nthe price will be divided by 12. It uses a currency formatter to format the price in the\ngiven locale. Note that this value may be an approximation. For Google subscriptions,\nthis value will use the basePlan to calculate the value.",
2075
+ "complexTypes": [],
2076
+ "type": "string"
2077
+ },
2078
+ {
2079
+ "name": "pricePerYearString",
2080
+ "tags": [],
2081
+ "docs": "Null for INAPP products. The price of the PurchasesStoreProduct formatted for the current\nlocale in a yearly recurrence. This means that, for example, if the period is monthly,\nthe price will be multiplied by 12. It uses a currency formatter to format the price in the\ngiven locale. Note that this value may be an approximation. For Google subscriptions,\nthis value will use the basePlan to calculate the value.",
2082
+ "complexTypes": [],
2083
+ "type": "string"
2084
+ },
2012
2085
  {
2013
2086
  "name": "currencyCode",
2014
2087
  "tags": [],
@@ -2335,6 +2408,15 @@
2335
2408
  "PresentedOfferingContext"
2336
2409
  ],
2337
2410
  "type": "PresentedOfferingContext | null"
2411
+ },
2412
+ {
2413
+ "name": "installmentsInfo",
2414
+ "tags": [],
2415
+ "docs": "For installment subscriptions, the details of the installment plan the customer commits to.\nNull for non-installment subscriptions.\nInstallment plans are only available for Google Play subscriptions.",
2416
+ "complexTypes": [
2417
+ "InstallmentsInfo"
2418
+ ],
2419
+ "type": "InstallmentsInfo | null"
2338
2420
  }
2339
2421
  ]
2340
2422
  },
@@ -2527,6 +2609,33 @@
2527
2609
  }
2528
2610
  ]
2529
2611
  },
2612
+ {
2613
+ "name": "InstallmentsInfo",
2614
+ "slug": "installmentsinfo",
2615
+ "docs": "Type containing information of installment subscriptions. Currently only supported in Google Play.",
2616
+ "tags": [
2617
+ {
2618
+ "name": "public"
2619
+ }
2620
+ ],
2621
+ "methods": [],
2622
+ "properties": [
2623
+ {
2624
+ "name": "commitmentPaymentsCount",
2625
+ "tags": [],
2626
+ "docs": "Number of payments the customer commits to in order to purchase the subscription.",
2627
+ "complexTypes": [],
2628
+ "type": "number"
2629
+ },
2630
+ {
2631
+ "name": "renewalCommitmentPaymentsCount",
2632
+ "tags": [],
2633
+ "docs": "After the commitment payments are complete, the number of payments the user commits to upon a renewal.",
2634
+ "complexTypes": [],
2635
+ "type": "number"
2636
+ }
2637
+ ]
2638
+ },
2530
2639
  {
2531
2640
  "name": "GetProductOptions",
2532
2641
  "slug": "getproductoptions",
@@ -2815,8 +2924,8 @@
2815
2924
  ]
2816
2925
  },
2817
2926
  {
2818
- "name": "SyncObserverModeAmazonPurchaseOptions",
2819
- "slug": "syncobservermodeamazonpurchaseoptions",
2927
+ "name": "SyncAmazonPurchaseOptions",
2928
+ "slug": "syncamazonpurchaseoptions",
2820
2929
  "docs": "",
2821
2930
  "tags": [],
2822
2931
  "methods": [],
@@ -2916,6 +3025,48 @@
2916
3025
  }
2917
3026
  ],
2918
3027
  "enums": [
3028
+ {
3029
+ "name": "PURCHASES_ARE_COMPLETED_BY_TYPE",
3030
+ "slug": "purchases_are_completed_by_type",
3031
+ "members": [
3032
+ {
3033
+ "name": "MY_APP",
3034
+ "value": "\"MY_APP\"",
3035
+ "tags": [],
3036
+ "docs": "RevenueCat will **not** automatically acknowledge any purchases. You will have to do so manually.\n\n**Note:** failing to acknowledge a purchase within 3 days will lead to Google Play automatically issuing a\nrefund to the user.\n\nFor more info, see [revenuecat.com](https://docs.revenuecat.com/docs/observer-mode#option-2-client-side)."
3037
+ },
3038
+ {
3039
+ "name": "REVENUECAT",
3040
+ "value": "\"REVENUECAT\"",
3041
+ "tags": [],
3042
+ "docs": "RevenueCat will automatically acknowledge verified purchases. No action is required by you."
3043
+ }
3044
+ ]
3045
+ },
3046
+ {
3047
+ "name": "STOREKIT_VERSION",
3048
+ "slug": "storekit_version",
3049
+ "members": [
3050
+ {
3051
+ "name": "STOREKIT_1",
3052
+ "value": "\"STOREKIT_1\"",
3053
+ "tags": [],
3054
+ "docs": "Always use StoreKit 1."
3055
+ },
3056
+ {
3057
+ "name": "STOREKIT_2",
3058
+ "value": "\"STOREKIT_2\"",
3059
+ "tags": [],
3060
+ "docs": "Always use StoreKit 2 (StoreKit 1 will be used if StoreKit 2 is not available in the current device.)\n- Warning: Make sure you have an In-App Purchase Key configured in your app.\nPlease see https://rev.cat/in-app-purchase-key-configuration for more info."
3061
+ },
3062
+ {
3063
+ "name": "DEFAULT",
3064
+ "value": "\"DEFAULT\"",
3065
+ "tags": [],
3066
+ "docs": "Let RevenueCat use the most appropiate version of StoreKit"
3067
+ }
3068
+ ]
3069
+ },
2919
3070
  {
2920
3071
  "name": "ENTITLEMENT_VERIFICATION_MODE",
2921
3072
  "slug": "entitlement_verification_mode",
@@ -3202,6 +3353,12 @@
3202
3353
  "tags": [],
3203
3354
  "docs": "Replacement takes effect immediately, and the new price will be charged on\nnext recurrence time. The billing cycle stays the same."
3204
3355
  },
3356
+ {
3357
+ "name": "DEFERRED",
3358
+ "value": "6",
3359
+ "tags": [],
3360
+ "docs": "Replacement takes effect when the old plan expires, and the new price will\nbe charged at the same time."
3361
+ },
3205
3362
  {
3206
3363
  "name": "IMMEDIATE_AND_CHARGE_FULL_PRICE",
3207
3364
  "value": "5",
@@ -3362,6 +3519,39 @@
3362
3519
  }
3363
3520
  ],
3364
3521
  "typeAliases": [
3522
+ {
3523
+ "name": "PurchasesAreCompletedBy",
3524
+ "slug": "purchasesarecompletedby",
3525
+ "docs": "Allows you to specify whether you want RevenueCat to complete your app's purchases\nor if your app will do so.\n\nYou can configure RevenueCat to complete your purchases like so:\n```typescript\nPurchases.configure({\n apiKey: \"123\",\n purchasesAreCompletedBy: PURCHASES_ARE_COMPLETED_BY.REVENUECAT,\n});\n```\n\nYou can specify that purchase are completed by your app like so:\n```typescript\nPurchases.configure({\n apiKey: \"123\",\n purchasesAreCompletedBy: {\n type: PURCHASES_ARE_COMPLETED_BY.MY_APP,\n storeKitVersion: STOREKIT_VERSION.STOREKIT_1\n },\n});\n```",
3526
+ "types": [
3527
+ {
3528
+ "text": "PURCHASES_ARE_COMPLETED_BY_TYPE.REVENUECAT",
3529
+ "complexTypes": [
3530
+ "PURCHASES_ARE_COMPLETED_BY_TYPE"
3531
+ ]
3532
+ },
3533
+ {
3534
+ "text": "PurchasesAreCompletedByMyApp",
3535
+ "complexTypes": [
3536
+ "PurchasesAreCompletedByMyApp"
3537
+ ]
3538
+ }
3539
+ ]
3540
+ },
3541
+ {
3542
+ "name": "PurchasesAreCompletedByMyApp",
3543
+ "slug": "purchasesarecompletedbymyapp",
3544
+ "docs": "Configuration option that specifies that your app will complete purchases.",
3545
+ "types": [
3546
+ {
3547
+ "text": "{\n type: PURCHASES_ARE_COMPLETED_BY_TYPE.MY_APP;\n /**\n * The version of StoreKit that your app is using to make purchases. This value is ignored\n * on Android, so if your app is Android-only, you may provide any value.\n */\n storeKitVersion: STOREKIT_VERSION;\n}",
3548
+ "complexTypes": [
3549
+ "PURCHASES_ARE_COMPLETED_BY_TYPE",
3550
+ "STOREKIT_VERSION"
3551
+ ]
3552
+ }
3553
+ ]
3554
+ },
3365
3555
  {
3366
3556
  "name": "CustomerInfoUpdateListener",
3367
3557
  "slug": "customerinfoupdatelistener",
@@ -3412,6 +3602,19 @@
3412
3602
  ]
3413
3603
  }
3414
3604
  ]
3605
+ },
3606
+ {
3607
+ "name": "SyncObserverModeAmazonPurchaseOptions",
3608
+ "slug": "syncobservermodeamazonpurchaseoptions",
3609
+ "docs": "",
3610
+ "types": [
3611
+ {
3612
+ "text": "SyncAmazonPurchaseOptions",
3613
+ "complexTypes": [
3614
+ "SyncAmazonPurchaseOptions"
3615
+ ]
3616
+ }
3617
+ ]
3415
3618
  }
3416
3619
  ],
3417
3620
  "pluginConfigs": []
@@ -1,4 +1,4 @@
1
- import type { CustomerInfo, CustomerInfoUpdateListener, GoogleProductChangeInfo, IntroEligibility, LogHandler, LogInResult, MakePurchaseResult, PurchasesConfiguration, PurchasesEntitlementInfo, PurchasesOfferings, PurchasesPackage, PurchasesPromotionalOffer, PurchasesStoreProduct, PurchasesStoreProductDiscount, SubscriptionOption, BILLING_FEATURE, LOG_LEVEL, PRODUCT_CATEGORY, REFUND_REQUEST_STATUS, IN_APP_MESSAGE_TYPE, PurchasesOffering } from '@revenuecat/purchases-typescript-internal-esm';
1
+ import type { CustomerInfo, CustomerInfoUpdateListener, GoogleProductChangeInfo, IntroEligibility, LogHandler, LogInResult, MakePurchaseResult, PurchasesConfiguration, PurchasesEntitlementInfo, PurchasesOfferings, PurchasesPackage, PurchasesPromotionalOffer, PurchasesStoreProduct, PurchasesStoreProductDiscount, SubscriptionOption, BILLING_FEATURE, LOG_LEVEL, PRODUCT_CATEGORY, REFUND_REQUEST_STATUS, IN_APP_MESSAGE_TYPE, PurchasesOffering, PurchasesStoreTransaction } from '@revenuecat/purchases-typescript-internal-esm';
2
2
  export * from '@revenuecat/purchases-typescript-internal-esm';
3
3
  export declare type PurchasesCallbackId = string;
4
4
  export interface GetProductOptions {
@@ -82,7 +82,7 @@ export interface PurchaseDiscountedPackageOptions {
82
82
  */
83
83
  discount: PurchasesPromotionalOffer;
84
84
  }
85
- export interface SyncObserverModeAmazonPurchaseOptions {
85
+ export interface SyncAmazonPurchaseOptions {
86
86
  /**
87
87
  * Product ID associated to the purchase.
88
88
  */
@@ -104,6 +104,10 @@ export interface SyncObserverModeAmazonPurchaseOptions {
104
104
  */
105
105
  price?: number | null;
106
106
  }
107
+ /**
108
+ * @deprecated - Use SyncAmazonPurchaseOptions instead
109
+ */
110
+ export declare type SyncObserverModeAmazonPurchaseOptions = SyncAmazonPurchaseOptions;
107
111
  export interface GetPromotionalOfferOptions {
108
112
  /**
109
113
  * The `PurchasesStoreProduct` the user intends to purchase.
@@ -129,14 +133,6 @@ export interface PurchasesPlugin {
129
133
  setMockWebResults(options: {
130
134
  shouldMockWebResults: boolean;
131
135
  }): Promise<void>;
132
- /**
133
- * @param options Set finishTransactions to false if you aren't using Purchases SDK to
134
- * make the purchase
135
- * @returns {Promise<void>} The promise will be rejected if configure has not been called yet.
136
- */
137
- setFinishTransactions(options: {
138
- finishTransactions: boolean;
139
- }): Promise<void>;
140
136
  /**
141
137
  * iOS only.
142
138
  * @param options Set this property to true *only* when testing the ask-to-buy / SCA
@@ -245,6 +241,18 @@ export interface PurchasesPlugin {
245
241
  restorePurchases(): Promise<{
246
242
  customerInfo: CustomerInfo;
247
243
  }>;
244
+ /**
245
+ * Use this method only if you already have your own IAP implementation using StoreKit 2 and want to use
246
+ * RevenueCat's backend. If you are using StoreKit 1 for your implementation, you do not need this method.
247
+ *
248
+ * You only need to use this method with *new* purchases. Subscription updates are observed automatically.
249
+ * @param options The productID that was purchased that needs to be synced with RevenueCat's backend.
250
+ */
251
+ recordPurchase(options: {
252
+ productID: string;
253
+ }): Promise<{
254
+ transaction: PurchasesStoreTransaction;
255
+ }>;
248
256
  /**
249
257
  * Get the appUserID
250
258
  * @returns {Promise<string>} The app user id in a promise
@@ -307,6 +315,7 @@ export interface PurchasesPlugin {
307
315
  */
308
316
  syncPurchases(): Promise<void>;
309
317
  /**
318
+ * @deprecated - Use syncAmazonPurchase instead
310
319
  * This method will send a purchase to the RevenueCat backend. This function should only be called if you are
311
320
  * in Amazon observer mode or performing a client side migration of your current users to RevenueCat.
312
321
  *
@@ -316,6 +325,16 @@ export interface PurchasesPlugin {
316
325
  * syncing purchases.
317
326
  */
318
327
  syncObserverModeAmazonPurchase(options: SyncObserverModeAmazonPurchaseOptions): Promise<void>;
328
+ /**
329
+ * This method will send a purchase to the RevenueCat backend. This function should only be called if you are
330
+ * in Amazon observer mode or performing a client side migration of your current users to RevenueCat.
331
+ *
332
+ * The receipt IDs are cached if successfully posted, so they are not posted more than once.
333
+ *
334
+ * @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error
335
+ * syncing purchases.
336
+ */
337
+ syncAmazonPurchase(options: SyncAmazonPurchaseOptions): Promise<void>;
319
338
  /**
320
339
  * Enable automatic collection of Apple Search Ad attribution on iOS. Disabled by default. Supported in iOS 14.3+ only
321
340
  * @returns {Promise<void>} The promise will be rejected if configure has not been called yet.