@arkadiuminc/sdk 2.58.1 → 2.59.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.
|
@@ -3,9 +3,17 @@ import { ApiEnv } from '../backend/backend.api';
|
|
|
3
3
|
import { Auth } from '../auth/';
|
|
4
4
|
import { VideoAdOptions } from './video-ad';
|
|
5
5
|
import { BannerAdOptions, AdTypes } from './display-ad';
|
|
6
|
-
import { GameLifecycleArena } from '../game-lifecycle/game-lifecycle.api';
|
|
6
|
+
import { GameLifecycleArena, GameLifecycleGame } from '../game-lifecycle/game-lifecycle.api';
|
|
7
7
|
import { IHost } from '../host';
|
|
8
8
|
|
|
9
|
+
export declare type ShowInterstitialAdOptions = {
|
|
10
|
+
duration?: number;
|
|
11
|
+
};
|
|
12
|
+
export declare type ShowRewardAdOptions = {
|
|
13
|
+
duration?: number;
|
|
14
|
+
context?: 'core' | 'default';
|
|
15
|
+
data?: any;
|
|
16
|
+
};
|
|
9
17
|
/** @hidden */
|
|
10
18
|
export interface AdsArena extends Ads, AdsArenaBanner {
|
|
11
19
|
}
|
|
@@ -46,19 +54,16 @@ export declare class AdsArenaProvider implements AdsArena {
|
|
|
46
54
|
showBannerAd(options: BannerAdOptions): any;
|
|
47
55
|
}
|
|
48
56
|
export declare class AdsGameProvider implements AdsGame {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
private
|
|
52
|
-
private
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}): Promise<
|
|
57
|
-
showRewardAd({ duration }?: {
|
|
58
|
-
duration?: number | undefined;
|
|
59
|
-
}): Promise<{
|
|
57
|
+
private readonly lifecycle;
|
|
58
|
+
readonly bannerSizes: typeof AdTypes;
|
|
59
|
+
private readonly interstitial;
|
|
60
|
+
private readonly rewarded;
|
|
61
|
+
private readonly banner;
|
|
62
|
+
constructor(rpcProvider: RpcProvider, env: ApiEnv, auth: Auth, lifecycle: GameLifecycleGame);
|
|
63
|
+
showInterstitialAd({ duration }?: ShowInterstitialAdOptions): Promise<void>;
|
|
64
|
+
showRewardAd({ duration, context, data }?: ShowRewardAdOptions): Promise<{
|
|
60
65
|
value: number;
|
|
61
66
|
}>;
|
|
62
|
-
showBannerAd(adId: string, dimensions: AdTypes[]):
|
|
67
|
+
showBannerAd(adId: string, dimensions: AdTypes[]): Promise<void>;
|
|
63
68
|
}
|
|
64
69
|
export {};
|
|
@@ -17,7 +17,10 @@ export declare enum LifecycleEvent {
|
|
|
17
17
|
AD_REWARDED_REQUESTED = 12,
|
|
18
18
|
AD_REWARDED_SHOWN = 13,
|
|
19
19
|
LEVEL_START = 14,
|
|
20
|
-
LEVEL_END = 15
|
|
20
|
+
LEVEL_END = 15,
|
|
21
|
+
REDEEM_POWERUP = 16,
|
|
22
|
+
OPT_LOG_IN = 17,
|
|
23
|
+
REWARD_START = 18
|
|
21
24
|
}
|
|
22
25
|
declare type LifecycleFn = (event: LifecycleEvent, payload?: any) => void;
|
|
23
26
|
declare global {
|
|
@@ -34,7 +37,7 @@ export declare class GameLifecycleArena {
|
|
|
34
37
|
LifecycleEvent: typeof LifecycleEvent;
|
|
35
38
|
constructor(rpcProvider: RpcProvider, host: IHost);
|
|
36
39
|
setVirtualItemsApiProvider(provider: VirtualItemsApiProvider): void;
|
|
37
|
-
onEvent(event: LifecycleEvent, payload?: any): Promise<
|
|
40
|
+
onEvent(event: LifecycleEvent, payload?: any): Promise<any>;
|
|
38
41
|
dispatchEvent(event: LifecycleEvent): Promise<void>;
|
|
39
42
|
subscribe(cb: LifecycleFn, override?: boolean): void;
|
|
40
43
|
onFtueEvent(eventId: string): Promise<boolean>;
|
|
@@ -54,6 +57,7 @@ export declare class GameLifecycleGame {
|
|
|
54
57
|
LifecycleEvent: typeof LifecycleEvent;
|
|
55
58
|
constructor(rpcProvider: RpcProvider);
|
|
56
59
|
private onEvent;
|
|
60
|
+
private getExecutionTimeLimitMs;
|
|
57
61
|
dispatchEvent(event: LifecycleEvent, payload?: any): Promise<any>;
|
|
58
62
|
onTestReady(): Promise<void>;
|
|
59
63
|
onGameStart(): Promise<void>;
|
|
@@ -75,5 +79,11 @@ export declare class GameLifecycleGame {
|
|
|
75
79
|
onLevelEnd(level: number): Promise<void>;
|
|
76
80
|
registerEventCallback(event: LifecycleEvent, callback: () => void): void;
|
|
77
81
|
onFtueEvent(eventId: string): Promise<boolean>;
|
|
82
|
+
onRedeemPowerup(data: any): Promise<any>;
|
|
83
|
+
onOptLogin(data: any): Promise<any>;
|
|
84
|
+
onRewardStart(data: any): Promise<any>;
|
|
85
|
+
private getPromiseForEvent;
|
|
86
|
+
private getCallbackType;
|
|
87
|
+
private setupPostMessageHandler;
|
|
78
88
|
}
|
|
79
89
|
export {};
|