apps-sdk 1.1.17 → 1.1.18

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apps-sdk",
3
- "version": "1.1.17",
3
+ "version": "1.1.18",
4
4
  "description": "Apps SDK",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -62,9 +62,10 @@ class Adapty {
62
62
  paywallView.registerEventHandlers({
63
63
  onCloseButtonPress: eventHandlers.onCloseButtonPress || (() => { return true; }),
64
64
  onAndroidSystemBack: eventHandlers.onAndroidSystemBack || (() => { paywallView.dismiss(); return true; }),
65
- onPurchaseCompleted: eventHandlers.onPurchaseCompleted || (() => { paywallView.dismiss(); return true; }),
66
65
  onPurchaseStarted: eventHandlers.onPurchaseStarted || (() => { }),
66
+ onPurchaseCompleted: eventHandlers.onPurchaseCompleted || (() => { paywallView.dismiss(); return true; }),
67
67
  onPurchaseFailed: eventHandlers.onPurchaseFailed || (() => { paywallView.dismiss(); return true; }),
68
+ onRestoreStarted: eventHandlers.onRestoreStarted || (() => { }),
68
69
  onRestoreCompleted: eventHandlers.onRestoreCompleted || (() => { paywallView.dismiss(); return true; }),
69
70
  onRestoreFailed: eventHandlers.onRestoreFailed || (() => { paywallView.dismiss(); return true; }),
70
71
  onProductSelected: eventHandlers.onProductSelected || (() => { }),
package/types/index.d.ts CHANGED
@@ -198,9 +198,10 @@ declare module 'apps-sdk' {
198
198
  type PaywallEventHandlers = {
199
199
  onCloseButtonPress?: () => void;
200
200
  onAndroidSystemBack?: () => void;
201
- onPurchaseCompleted?: (purchaseResult: any, product: any) => void;
202
201
  onPurchaseStarted?: (product: any) => void;
202
+ onPurchaseCompleted?: (purchaseResult: any, product: any) => void;
203
203
  onPurchaseFailed?: (error: any) => void;
204
+ onRestoreStarted?: () => void;
204
205
  onRestoreCompleted?: (profile: any) => void;
205
206
  onRestoreFailed?: (error: any, product: any) => void;
206
207
  onProductSelected?: (productId: string) => void;