@adjoe/react-native-adjoe-sdk 0.0.0-stage → 5.1.3

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.
Files changed (45) hide show
  1. package/README.md +33 -2
  2. package/android/build.gradle +93 -0
  3. package/android/src/main/AndroidManifest.xml +11 -0
  4. package/android/src/main/java/io/adjoe/sdk/reactnative/BasicUtil.kt +361 -0
  5. package/android/src/main/java/io/adjoe/sdk/reactnative/ErrorsUtil.kt +113 -0
  6. package/android/src/main/java/io/adjoe/sdk/reactnative/PlaytimeProtectionImpl.kt +150 -0
  7. package/android/src/main/java/io/adjoe/sdk/reactnative/PlaytimeStudioImpl.kt +313 -0
  8. package/android/src/main/java/io/adjoe/sdk/reactnative/RNPlaytimeSdkImpl.kt +173 -0
  9. package/android/src/main/java/io/adjoe/sdk/reactnative/RNPlaytimeSdkPackage.kt +55 -0
  10. package/android/src/main/java/io/adjoe/sdk/reactnative/StudioUtil.kt +421 -0
  11. package/android/src/main/java/io/adjoe/sdk/reactnative/Util.kt +40 -0
  12. package/android/src/newarch/java/io/adjoe/sdk/reactnative/RNPlaytimeProtection.kt +25 -0
  13. package/android/src/newarch/java/io/adjoe/sdk/reactnative/RNPlaytimeSdkModule.kt +57 -0
  14. package/android/src/newarch/java/io/adjoe/sdk/reactnative/RNPlaytimeStudio.kt +66 -0
  15. package/android/src/oldarch/java/io/adjoe/sdk/reactnative/RNPlaytimeProtection.kt +29 -0
  16. package/android/src/oldarch/java/io/adjoe/sdk/reactnative/RNPlaytimeSdkModule.kt +68 -0
  17. package/android/src/oldarch/java/io/adjoe/sdk/reactnative/RNPlaytimeStudio.kt +83 -0
  18. package/ios/AdjoeSdk.xcodeproj/project.pbxproj +281 -0
  19. package/ios/AdjoeSdk.xcodeproj/xcuserdata/hamid.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
  20. package/ios/AdjoeSdk.xcworkspace/contents.xcworkspacedata +7 -0
  21. package/ios/ErrorsUtil.swift +180 -0
  22. package/ios/PlaytimeProtectionImpl.swift +20 -0
  23. package/ios/PlaytimeSdkImpl.swift +173 -0
  24. package/ios/PlaytimeStudioImpl.swift +272 -0
  25. package/ios/RNPlaytimeBasic.mm +187 -0
  26. package/ios/RNPlaytimeHelpers.h +21 -0
  27. package/ios/RNPlaytimeHelpers.m +94 -0
  28. package/ios/RNPlaytimeProtection.mm +77 -0
  29. package/ios/RNPlaytimeStudio.mm +265 -0
  30. package/package.json +35 -4
  31. package/react-native-adjoe-sdk.podspec +30 -0
  32. package/src/Playtime.js +158 -0
  33. package/src/PlaytimeException.js +140 -0
  34. package/src/PlaytimeProtection.js +40 -0
  35. package/src/PlaytimeStudio.js +110 -0
  36. package/src/index.js +8 -0
  37. package/src/specs/NativePlaytimeProtection.ts +9 -0
  38. package/src/specs/NativePlaytimeStudio.ts +23 -0
  39. package/src/specs/NativeRNPlaytimeSdk.ts +17 -0
  40. package/src-ts/Playtime.d.ts +407 -0
  41. package/src-ts/PlaytimeException.d.ts +87 -0
  42. package/src-ts/PlaytimeProtection.d.ts +106 -0
  43. package/src-ts/PlaytimeStudio.d.ts +818 -0
  44. package/src-ts/index.d.ts +8 -0
  45. package/tsconfig.json +114 -0
@@ -0,0 +1,818 @@
1
+ import { AppCategory, PlaytimeMetadata } from "./Playtime";
2
+
3
+ /**
4
+ * Rewarded action representation.
5
+ */
6
+ export interface PlaytimeRewardAction {
7
+ /**
8
+ * Reward action name.
9
+ */
10
+ name?: string | null;
11
+
12
+ /**
13
+ * Description of the task.
14
+ */
15
+ taskDescription?: string | null;
16
+
17
+ /**
18
+ * The level number of the time-based event.
19
+ */
20
+ level?: number | null;
21
+
22
+ /**
23
+ * Type of task to complete. Possible values: sequential, bonus, playtime, cpa.
24
+ */
25
+ taskType: string;
26
+
27
+ /**
28
+ * Duration (in seconds) of play time required to reward a time-based event. Currently not supported on iOS.
29
+ */
30
+ playDuration?: number | null;
31
+
32
+ /**
33
+ * The amount of coins or rewards the user will receive upon completing the event.
34
+ */
35
+ amount: number;
36
+
37
+ /**
38
+ * Timestamp when a reward was granted (ISO 8601).
39
+ */
40
+ rewardedAt?: string | null;
41
+
42
+ /**
43
+ * Number of times that the action can be rewarded, applicable to repetitive events.
44
+ */
45
+ rewardsCount?: number | null;
46
+
47
+ /**
48
+ * Number of times that the action has been rewarded, applicable to repetitive events.
49
+ */
50
+ completedRewards?: number | null;
51
+
52
+ /**
53
+ * Time window (in minutes) during which the Booster reward is applicable.
54
+ */
55
+ timedCoinsDuration?: number | null;
56
+
57
+ /**
58
+ * Amount of coins rewarded during the booster period.
59
+ */
60
+ timedCoins?: number | null;
61
+
62
+ /**
63
+ * The amount of coins or rewards the user would receive if there was no promotion.
64
+ */
65
+ originalCoins?: number | null;
66
+
67
+ /**
68
+ * Flag indicating whether the event is a booster event.
69
+ */
70
+ isTimed?: boolean | null;
71
+
72
+ /**
73
+ * Flag indicating whether the event has been rewarded with promotion.
74
+ */
75
+ isRewardedForPromotion?: boolean | null;
76
+
77
+ /**
78
+ * Timestamp (ISO 8601) indicating when the booster reward expires.
79
+ */
80
+ boosterExpiresAt?: string | null;
81
+ }
82
+
83
+ /**
84
+ * Promotion representation.
85
+ */
86
+ export interface PlaytimePromotion {
87
+ /**
88
+ * Promotion name.
89
+ */
90
+ name?: string | null;
91
+
92
+ /**
93
+ * Description of the promotion.
94
+ */
95
+ promotionDescription?: string | null;
96
+
97
+ /**
98
+ * Boost multiplier for the promotion.
99
+ */
100
+ boostFactor?: number | null;
101
+
102
+ /**
103
+ * Promotion start timestamp (ISO 8601).
104
+ */
105
+ startTime?: string | null;
106
+
107
+ /**
108
+ * Promotion end timestamp (ISO 8601).
109
+ */
110
+ endTime?: string | null;
111
+
112
+ /**
113
+ * Targeting type for promotion.
114
+ */
115
+ targetingType?: string | null;
116
+ }
117
+
118
+ /**
119
+ * A class representing a media item.
120
+ */
121
+ export interface PlaytimeMedia {
122
+ /**
123
+ * URL to portrait-oriented media.
124
+ */
125
+ portrait?: string | null;
126
+
127
+ /**
128
+ * URL to landscape-oriented media.
129
+ */
130
+ landscape?: string | null;
131
+ }
132
+
133
+ /**
134
+ * Configuration for multi-event rewards.
135
+ */
136
+ export interface PlaytimeEventConfig {
137
+ /**
138
+ * Array of rewarded events that must be completed in the given order.
139
+ */
140
+ sequentialActions: PlaytimeRewardAction[];
141
+
142
+ /**
143
+ * Array of rewarded events that can be completed in any order.
144
+ */
145
+ bonusActions: PlaytimeRewardAction[];
146
+
147
+ /**
148
+ * Array of events that are rewarded based on the time played.
149
+ */
150
+ timeBasedActions: PlaytimeRewardAction[];
151
+
152
+ /**
153
+ * Array of CPA (Cost Per Action) events that reward the user for completing specific in-app actions.
154
+ */
155
+ cpaActions: PlaytimeRewardAction[];
156
+
157
+ /**
158
+ * Total coins collected by the user.
159
+ */
160
+ totalCoinsCollected?: number | null;
161
+
162
+ /**
163
+ * Maximum possible coins for this config.
164
+ */
165
+ totalCoinsPossible?: number | null;
166
+
167
+ /**
168
+ * The amount of time in seconds to the next level.
169
+ *
170
+ * Provided on Android only.
171
+ */
172
+ secondsToNextLevel?: number | null;
173
+
174
+ /**
175
+ * Maximum possible coins for this config if there was no promotion.
176
+ */
177
+ totalOriginalCoinsPossible?: number | null;
178
+
179
+ /**
180
+ * Cashback reward configuration for in-app purchases.
181
+ */
182
+ cashbackReward?: PlaytimeCashbackConfig | null;
183
+
184
+ /**
185
+ * Array of events that multiply the rewards.
186
+ */
187
+ multipliersActions: PlaytimeRewardActionMultiplier[];
188
+
189
+ /**
190
+ * Total amount of coins for all sequential events with promotion multiplier.
191
+ */
192
+ totalSequentialCoins?: number | null;
193
+
194
+ /**
195
+ * Total amount of coins for all sequential events without promotion multiplier.
196
+ */
197
+ totalOriginalSequentialCoins?: number | null;
198
+
199
+ /**
200
+ * Total amount of coins for all bonus events with promotion multiplier.
201
+ */
202
+ totalBonusCoins?: number | null;
203
+
204
+ /**
205
+ * Total amount of coins for all bonus events without promotion multiplier.
206
+ */
207
+ totalOriginalBonusCoins?: number | null;
208
+ }
209
+
210
+ /**
211
+ * Configuration for a multiplier event that multiplies rewards.
212
+ */
213
+ export interface PlaytimeRewardActionMultiplier {
214
+ /**
215
+ * The event's name.
216
+ */
217
+ eventName?: string | null;
218
+
219
+ /**
220
+ * The event's description.
221
+ */
222
+ eventDescription?: string | null;
223
+
224
+ /**
225
+ * Multiplication factor of the coin for the multiplier event (0-100).
226
+ */
227
+ multiplierFactorPercentage?: number | null;
228
+
229
+ /**
230
+ * Maximum number of levels that can be multiplied by the event.
231
+ */
232
+ multiplierLevels?: number | null;
233
+
234
+ /**
235
+ * Status of the multiplied event: Pending, Active, or Finished.
236
+ */
237
+ status?: string | null;
238
+
239
+ /**
240
+ * Number of levels that has been multiplied by the event.
241
+ */
242
+ usedLevels?: number | null;
243
+ }
244
+
245
+ /**
246
+ * Configuration for the Playtime Cashback feature.
247
+ */
248
+ export interface PlaytimeCashbackConfig {
249
+ /**
250
+ * Amount of coins rewarded per 1 USD of IAP.
251
+ */
252
+ exchangeRate?: number | null;
253
+
254
+ /**
255
+ * Description of the cashback reward.
256
+ */
257
+ cashbackDescription?: string | null;
258
+
259
+ /**
260
+ * Limit of USD available as cashback reward.
261
+ */
262
+ maxLimitPerCampaignUSD?: number | null;
263
+
264
+ /**
265
+ * Limit of coins available as cashback reward.
266
+ */
267
+ maxLimitPerCampaignCoins?: number | null;
268
+
269
+ /**
270
+ * Info on completed cashback rewards.
271
+ */
272
+ completedRewards?: PlaytimeCashbackReward | null;
273
+
274
+ /**
275
+ * Info on pending cashback rewards.
276
+ */
277
+ pendingRewards?: PlaytimeCashbackReward | null;
278
+ }
279
+
280
+ /**
281
+ * Cashback reward info.
282
+ */
283
+ export interface PlaytimeCashbackReward {
284
+ /**
285
+ * Total amount of coins for given rewarded events group.
286
+ */
287
+ totalCoins?: number | null;
288
+
289
+ /**
290
+ * Events in the reward group.
291
+ */
292
+ events: PlaytimeCashbackRewardEvent[];
293
+ }
294
+
295
+ /**
296
+ * Cashback event.
297
+ */
298
+ export interface PlaytimeCashbackRewardEvent {
299
+ /**
300
+ * Amount of coins granted for the event.
301
+ */
302
+ coins?: number | null;
303
+
304
+ /**
305
+ * Timestamp (ISO 8601) when the event is processed.
306
+ */
307
+ processAt?: string | null;
308
+
309
+ /**
310
+ * Timestamp (ISO 8601) when the event is received.
311
+ */
312
+ receivedAt?: string | null;
313
+ }
314
+
315
+ /**
316
+ * The model that represents a campaign and/or installed application.
317
+ */
318
+ export interface PlaytimeCampaign {
319
+ /**
320
+ * App name.
321
+ */
322
+ appName: string;
323
+
324
+ /**
325
+ * Short description of the app.
326
+ */
327
+ appDescription: string;
328
+
329
+ /**
330
+ * Unique identifier for the app.
331
+ */
332
+ appID: string;
333
+
334
+ /**
335
+ * ID in the format com.example.myapp.
336
+ *
337
+ * Provided on iOS only.
338
+ */
339
+ appBundleID?: string | null;
340
+
341
+ /**
342
+ * App installation timestamp (ISO 8601).
343
+ */
344
+ installedAt?: string | null;
345
+
346
+ /**
347
+ * App uninstallation timestamp (ISO 8601).
348
+ */
349
+ uninstalledAt?: string | null;
350
+
351
+ /**
352
+ * Time (in days) after which rewards expire after installation.
353
+ */
354
+ rewardingExpiresAfter?: number | null;
355
+
356
+ /**
357
+ * Expiration timestamp (ISO 8601) denoting how long players can get rewards after installing the app.
358
+ */
359
+ rewardingExpiresAt?: string | null;
360
+
361
+ /**
362
+ * Timestamp (ISO 8601) denoting the maximum amount of time after fetching the campaign that it can be installed.
363
+ */
364
+ campaignExpiresAt?: string | null;
365
+
366
+ /**
367
+ * Event and rewards configuration.
368
+ */
369
+ eventConfig?: PlaytimeEventConfig | null;
370
+
371
+ /**
372
+ * App category.
373
+ */
374
+ appCategory?: string | null;
375
+
376
+ /**
377
+ * Campaign type.
378
+ */
379
+ campaignType?: string | null;
380
+
381
+ /**
382
+ * Ordered position for specific featured campaigns.
383
+ */
384
+ featuredPosition?: number | null;
385
+
386
+ /**
387
+ * eCPM of the campaign.
388
+ */
389
+ score?: number | null;
390
+
391
+ /**
392
+ * Campaign media assets (portrait & landscape).
393
+ */
394
+ image?: PlaytimeMedia | null;
395
+
396
+ /**
397
+ * Campaign video media assets.
398
+ */
399
+ video?: PlaytimeMedia | null;
400
+
401
+ /**
402
+ * URL to the campaign icon image.
403
+ */
404
+ iconImage?: string | null;
405
+
406
+ /**
407
+ * Active promotion details, if any.
408
+ */
409
+ promotion?: PlaytimePromotion | null;
410
+
411
+ /**
412
+ * Flag indicating whether all rewards have been collected.
413
+ */
414
+ isCompleted: boolean;
415
+
416
+ /**
417
+ * Campaign UUID.
418
+ */
419
+ campaignUUID?: string | null;
420
+
421
+ /**
422
+ * Current status of the campaign.
423
+ */
424
+ status: PlaytimeCampaignStatus;
425
+
426
+ /**
427
+ * Flag indicating whether CPA is enabled.
428
+ */
429
+ isCpa: boolean;
430
+
431
+ /**
432
+ * CPA of the campaign.
433
+ */
434
+ cpa: number;
435
+
436
+ /**
437
+ * The campaign token.
438
+ */
439
+ token: string;
440
+ }
441
+
442
+ /**
443
+ * The response of the SDK containing campaigns.
444
+ */
445
+ export interface PlaytimeCampaignsResponse {
446
+ /**
447
+ * The requested selection of campaigns.
448
+ */
449
+ campaigns: PlaytimeCampaign[];
450
+ }
451
+
452
+ /**
453
+ * Impression type for Playtime interaction.
454
+ */
455
+ export enum PlaytimeImpressionType {
456
+ /**
457
+ * The default interaction which should be invoked when the user sees the campaign view.
458
+ */
459
+ DEFAULT = 0,
460
+
461
+ /**
462
+ * Engaged interaction which signifies that the user interacted with the campaign.
463
+ */
464
+ ENGAGED = 1
465
+ }
466
+
467
+ /**
468
+ * The consent action to apply when updating the user's Playtime terms of service consent.
469
+ */
470
+ export enum TosConsentAction {
471
+ /**
472
+ * Accept the terms of service on behalf of the user.
473
+ */
474
+ ACCEPT = 0,
475
+
476
+ /**
477
+ * Withdraw the user's previously granted consent to the terms of service.
478
+ */
479
+ WITHDRAW = 1
480
+ }
481
+
482
+ /**
483
+ * Represents the current status of a campaign.
484
+ */
485
+ export enum PlaytimeCampaignStatus {
486
+ /**
487
+ * The campaign is available for installation.
488
+ */
489
+ AVAILABLE = 0,
490
+
491
+ /**
492
+ * Waiting for the app installation.
493
+ */
494
+ PENDING = 1,
495
+
496
+ /**
497
+ * The app associated with the campaign has been installed.
498
+ */
499
+ INSTALLED = 2,
500
+
501
+ /**
502
+ * The campaign installation or processing has failed.
503
+ */
504
+ FAILED = 3
505
+ }
506
+
507
+ /**
508
+ * Options for campaign distribution requests. Provides context (placement, category, display format, promotion tag, and per-request UA context) to the backend for campaign targeting.
509
+ */
510
+ export interface CampaignOptions {
511
+ /**
512
+ * The placement where the campaigns will be shown.
513
+ *
514
+ * @defaultValue null
515
+ */
516
+ placement?: StudioPlacement | null;
517
+
518
+ /**
519
+ * The app category filter. Defaults to GAMING.
520
+ *
521
+ * @defaultValue AppCategory.GAMING
522
+ */
523
+ category?: AppCategory | null;
524
+
525
+ /**
526
+ * The UI display format.
527
+ *
528
+ * @defaultValue null
529
+ */
530
+ displayFormat?: DisplayFormat | null;
531
+
532
+ /**
533
+ * An optional promotion tag to trigger user-level promotions.
534
+ *
535
+ * @defaultValue null
536
+ */
537
+ promotionTag?: string | null;
538
+
539
+ /**
540
+ * Metadata visible in S2S payouts.
541
+ *
542
+ * @defaultValue null
543
+ */
544
+ metadata?: PlaytimeMetadata | null;
545
+ }
546
+
547
+ /**
548
+ * Options for installed-campaign requests. Exposes only the app category filter for campaign targeting.
549
+ */
550
+ export interface InstalledCampaignOptions {
551
+ /**
552
+ * The app category filter. Defaults to GAMING.
553
+ *
554
+ * @defaultValue AppCategory.GAMING
555
+ */
556
+ category?: AppCategory | null;
557
+ }
558
+
559
+ /**
560
+ * Represents the placement where Studio campaigns will be shown.
561
+ * Use one of the predefined placements or create a custom placement via the custom case.
562
+ */
563
+ export type StudioPlacement = string;
564
+
565
+ /**
566
+ * Represents the placement where Studio campaigns will be shown.
567
+ * Use one of the predefined placements or create a custom placement via the custom case.
568
+ */
569
+ export const StudioPlacement: {
570
+ /**
571
+ * Campaigns placed in the navigation bar.
572
+ */
573
+ readonly Navbar: 'navbar';
574
+
575
+ /**
576
+ * Campaigns placed as an icon.
577
+ */
578
+ readonly Icon: 'icon';
579
+
580
+ /**
581
+ * Campaigns placed in the earn tab.
582
+ */
583
+ readonly EarnTab: 'earn_tab';
584
+
585
+ /**
586
+ * Campaigns placed in the game tab.
587
+ */
588
+ readonly GameTab: 'game_tab';
589
+
590
+ /**
591
+ * Campaigns placed on the home page.
592
+ */
593
+ readonly HomePage: 'home_page';
594
+
595
+ /**
596
+ * Campaigns placed in the notification inbox.
597
+ */
598
+ readonly NotificationInbox: 'notification_inbox';
599
+
600
+ /**
601
+ * Campaigns placed in a notification.
602
+ */
603
+ readonly Notification: 'notification';
604
+
605
+ /**
606
+ * Campaigns placed in a mini game.
607
+ */
608
+ readonly MiniGame: 'mini_game';
609
+
610
+ /**
611
+ * Campaigns placed on the order page.
612
+ */
613
+ readonly OrderPage: 'order_page';
614
+
615
+ /**
616
+ * Campaigns placed in the redeem section.
617
+ */
618
+ readonly RedeemSection: 'redeem_section';
619
+
620
+ /**
621
+ * Campaigns placed in the scan receipt flow.
622
+ */
623
+ readonly ScanReceipt: 'scan_receipt';
624
+
625
+ /**
626
+ * Campaigns placed in the step converter.
627
+ */
628
+ readonly StepConverter: 'step_converter';
629
+ };
630
+
631
+ /**
632
+ * Represents the display format for campaign rendering.
633
+ * Use one of the predefined formats or create a custom format via the custom case.
634
+ */
635
+ export type DisplayFormat = string;
636
+
637
+ /**
638
+ * Represents the display format for campaign rendering.
639
+ * Use one of the predefined formats or create a custom format via the custom case.
640
+ */
641
+ export const DisplayFormat: {
642
+ /**
643
+ * Renders campaigns as icons.
644
+ */
645
+ readonly Icon: 'icon';
646
+
647
+ /**
648
+ * Renders campaigns as notifications.
649
+ */
650
+ readonly Notification: 'notification';
651
+
652
+ /**
653
+ * Renders campaigns in a notification inbox.
654
+ */
655
+ readonly NotificationInbox: 'notification_inbox';
656
+
657
+ /**
658
+ * Renders campaigns in a horizontally scrolling carousel.
659
+ */
660
+ readonly Carousel: 'carousel';
661
+
662
+ /**
663
+ * Renders campaigns in a custom catalog layout.
664
+ */
665
+ readonly CustomCatalog: 'custom_catalog';
666
+
667
+ /**
668
+ * Renders campaigns as a banner.
669
+ */
670
+ readonly Banner: 'banner';
671
+
672
+ /**
673
+ * Renders campaigns in a popup.
674
+ */
675
+ readonly Popup: 'popup';
676
+
677
+ /**
678
+ * Renders campaigns as an interstitial.
679
+ */
680
+ readonly Interstitial: 'interstitial';
681
+ };
682
+
683
+ declare namespace _default {
684
+ /**
685
+ * Update the user's consent to the Playtime terms of service, either accepting or withdrawing it.
686
+ *
687
+ * Supported on both Android and iOS.
688
+ * @param action The consent action to apply: accept or withdraw the terms of service.
689
+ */
690
+ function updateTosConsent(action: TosConsentAction): Promise<void>;
691
+
692
+ /**
693
+ * Get the list of offers that a user can install.
694
+ *
695
+ * Supported on both Android and iOS.
696
+ * @param campaignOptions Options for campaign distribution requests.
697
+ * @returns The response to the request.
698
+ */
699
+ function getCampaigns(campaignOptions: CampaignOptions): Promise<PlaytimeCampaignsResponse>;
700
+
701
+ /**
702
+ * Get offer details for the specified tokens.
703
+ *
704
+ * Supported on both Android and iOS.
705
+ * @param tokens The tokens of the offers to get details for.
706
+ * @param campaignOptions Options for campaign distribution requests.
707
+ * @returns The response to the request.
708
+ */
709
+ function getOfferDetails(tokens: string[], campaignOptions: CampaignOptions): Promise<PlaytimeCampaignsResponse>;
710
+
711
+ /**
712
+ * Get the list of apps the user has already installed and that will contain the progress the user has made already.
713
+ *
714
+ * Supported on both Android and iOS.
715
+ * @param options Options for installed-campaign requests.
716
+ * @returns The response to the request.
717
+ */
718
+ function getInstalledCampaigns(options: InstalledCampaignOptions): Promise<PlaytimeCampaignsResponse>;
719
+
720
+ /**
721
+ * Use this method to forward the user to the store.
722
+ *
723
+ * Supported on both Android and iOS.
724
+ * @param campaign The campaign that user want to install
725
+ * @param useInlineInstall set it to true if you want to use inline install
726
+ */
727
+ function openInStore(campaign: PlaytimeCampaign, useInlineInstall: boolean): Promise<void>;
728
+
729
+ /**
730
+ * Use this method to open installed application.
731
+ *
732
+ * Supported on both Android and iOS.
733
+ */
734
+ function openInstalledCampaign(campaign: PlaytimeCampaign): Promise<void>;
735
+
736
+ /**
737
+ * Use this method to open chatbot.
738
+ *
739
+ * Supported on both Android and iOS.
740
+ */
741
+ function openChatbot(campaign?: PlaytimeCampaign | null): Promise<void>;
742
+
743
+ /**
744
+ * Use this method to reset rewards connect
745
+ *
746
+ * Supported on both Android and iOS.
747
+ */
748
+ function resetRewardsConnect(): Promise<void>;
749
+
750
+ /**
751
+ * Execute an impression request for the given campaign.
752
+ * This method tracks view execution locally and ensures only one view tracking request
753
+ * is sent to the backend per campaign within a 30-minute window.
754
+ *
755
+ * Supported on both Android and iOS.
756
+ * @param campaign The campaign which view should be executed.
757
+ * @param impressionType The type of impression you want to execute.
758
+ */
759
+ function executeCampaignImpression(campaign: PlaytimeCampaign, impressionType: PlaytimeImpressionType): Promise<void>;
760
+
761
+ /**
762
+ * Execute an impression request for the given offer.
763
+ * This method tracks view execution locally and ensures only one view tracking request
764
+ * is sent to the backend per campaign within a 30-minute window.
765
+ *
766
+ * Supported on both Android and iOS.
767
+ * @param token Token of the campaign.
768
+ * @param appID App ID of the campaign.
769
+ */
770
+ function executeOfferImpression(token: string, appID: string): Promise<void>;
771
+
772
+ /**
773
+ * Register the user with Playtime. The RewardsConnect sheet will be displayed to the user and, on pressing Connect, the following
774
+ * scenarios are possible:
775
+ * 1. If the user is not registered with Playtime, the user will be prompted to register a new passkey. This passkey will be stored on
776
+ * the user’s device (and may be synced to iCloud) and associated with the user’s Adjoe account.
777
+ * 2. If the user is already registered with Playtime, but the SDK is not aware of it (e.g. when the app was deleted and reinstalled),
778
+ * the user will be prompted to log in with the passkey stored on the device. If the passkey is not present, the will be prompted to
779
+ * register a new passkey.
780
+ * 3. The user has either registered the passkey or logged in successfully. Any subsequent call will return without error.
781
+ *
782
+ * Supported on both Android and iOS.
783
+ */
784
+ function registerRewardsConnect(): Promise<void>;
785
+
786
+ /**
787
+ * Use this method to deeplink campaign details.
788
+ *
789
+ * Supported on both Android and iOS.
790
+ * @param campaign The campaign to show details for.
791
+ */
792
+ function showCampaignDetails(campaign: PlaytimeCampaign): Promise<void>;
793
+
794
+ /**
795
+ * Use this method to deeplink offer details using an access token and app ID.
796
+ *
797
+ * Supported on both Android and iOS.
798
+ * @param token The token of the offer to show details for.
799
+ * @param appID The app ID of the offer.
800
+ */
801
+ function showOfferDetails(token: string, appID: string): Promise<void>;
802
+
803
+ /**
804
+ * Use this method to deeplink installed campaigns.
805
+ *
806
+ * Supported on both Android and iOS.
807
+ */
808
+ function showInstalledCampaigns(): Promise<void>;
809
+
810
+ /**
811
+ * Show the prompt requesting user's permissions.
812
+ *
813
+ * Supported on Android only. Calling it on iOS rejects as unsupported.
814
+ */
815
+ function showPermissionsPrompt(): Promise<void>;
816
+ }
817
+
818
+ export default _default;