@@ -14,6 +14,7 @@ import type {
14
14
ApphudUser ,
15
15
ApphudPlacement ,
16
16
Identifiers ,
17
+ PaywallLogsInfo ,
17
18
} from './types' ;
18
19
19
20
interface IApphudSdk {
@@ -42,24 +43,34 @@ interface IApphudSdk {
42
43
/**
43
44
* Available on iOS and Android.
44
45
*
46
+ * Returns the placements from Product Hub > Placements, potentially altered based on the user's involvement in A/ B testing, if applicable
47
+ *
48
+ */
49
+ placements ( ) : Promise < ApphudPlacement [ ] > ;
50
+
51
+ /**
52
+ * Available on iOS and Android.
53
+ *
54
+ * @deprecated Will be removed in the future
55
+ *
45
56
* Each paywall contains an array of `ApphudProduct` objects that you use for purchase.
46
57
* `ApphudProduct` is Apphud's wrapper around `SKProduct`/ `ProductDetails` models.
47
58
* Method returns immediately if paywalls are cached or already loaded.
48
59
* @returns paywalls configured in Apphud Dashboard > Product Hub > Paywalls.
49
60
*/
50
- paywalls ( ) : Promise < Array < ApphudPaywall > > ;
61
+ paywalls ( ) : Promise < ApphudPaywall [ ] > ;
51
62
52
63
/**
53
64
* Available on iOS and Android
54
65
* Logs a "Paywall Shown" (Paywall View) event which is required for A/B Testing Analytics.
55
66
*/
56
- paywallShown ( identifier : string ) : void ;
67
+ paywallShown ( options : PaywallLogsInfo ) : void ;
57
68
58
69
/**
59
70
* Available on iOS and Android
60
71
* Logs a "Paywall Closed" event. Optional.
61
72
*/
62
- paywallClosed ( identifier : string ) : void ;
73
+ paywallClosed ( options : PaywallLogsInfo ) : void ;
63
74
64
75
/**
65
76
* Available on iOS and Android.
@@ -273,14 +284,6 @@ interface IApphudSdk {
273
284
*/
274
285
handlePushNotification ( payload : any ) : void ;
275
286
276
- /**
277
- * Available on iOS and Android.
278
- *
279
- * Returns the placements from Product Hub > Placements, potentially altered based on the user's involvement in A/ B testing, if applicable
280
- *
281
- */
282
- placements ( ) : Promise < ApphudPlacement [ ] > ;
283
-
284
287
/**
285
288
* Available on iOS
286
289
*
0 commit comments