@arkadiuminc/sdk 0.0.47 → 0.0.49
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.
|
@@ -13,10 +13,29 @@ declare type RewardAdContract = {
|
|
|
13
13
|
value: number;
|
|
14
14
|
}>;
|
|
15
15
|
};
|
|
16
|
+
export declare enum AdTypes {
|
|
17
|
+
AD_300x250 = "AD_300x250",
|
|
18
|
+
AD_250x250 = "AD_250x250",
|
|
19
|
+
AD_336x280 = "AD_336x280",
|
|
20
|
+
AD_300x600 = "AD_300x600",
|
|
21
|
+
AD_728x90 = "AD_728x90",
|
|
22
|
+
AD_970x90 = "AD_970x90",
|
|
23
|
+
AD_970x250 = "AD_970x250",
|
|
24
|
+
AD_320x50 = "AD_320x50",
|
|
25
|
+
AD_320x100 = "AD_320x100",
|
|
26
|
+
AD_468x60 = "AD_468x60",
|
|
27
|
+
AD_160x600 = "AD_160x600"
|
|
28
|
+
}
|
|
29
|
+
declare class BannerAds {
|
|
30
|
+
private displayAd;
|
|
31
|
+
show(adId: string, dimensions: AdTypes[]): void;
|
|
32
|
+
private matchAdSize;
|
|
33
|
+
}
|
|
16
34
|
export declare class AdsApi {
|
|
17
35
|
interstitial: InterstitialAdContract;
|
|
18
36
|
rewarded: RewardAdContract;
|
|
19
|
-
|
|
37
|
+
private bannerAd;
|
|
38
|
+
constructor(interstitial: InterstitialAdContract, rewarded: RewardAdContract, bannerAd: BannerAds | undefined);
|
|
20
39
|
static getArenaApi(rpcProvider: RpcProvider, userStateApi: UserStateApi): AdsApi;
|
|
21
40
|
static getGameApi(rpcProvider: RpcProvider, env: ApiEnv): AdsApi;
|
|
22
41
|
}
|
|
@@ -4,11 +4,17 @@ declare enum LifecycleEvent {
|
|
|
4
4
|
GAME_START = 2,
|
|
5
5
|
INTERACT = 3,
|
|
6
6
|
SCORE_CHANGED = 4,
|
|
7
|
-
GAME_END = 5
|
|
7
|
+
GAME_END = 5,
|
|
8
|
+
PAUSE_READY = 6,
|
|
9
|
+
GAME_PAUSE = 7,
|
|
10
|
+
GAME_RESUME = 8
|
|
8
11
|
}
|
|
9
12
|
declare type LifecycleFn = (event: LifecycleEvent, payload?: any) => void;
|
|
10
13
|
export interface GameLifecycleContract {
|
|
11
14
|
OnTestReady(): Promise<void>;
|
|
15
|
+
OnPauseReady(): Promise<void>;
|
|
16
|
+
OnGamePause(): Promise<void>;
|
|
17
|
+
OnGameResume(): Promise<void>;
|
|
12
18
|
OnGameStart(): Promise<void>;
|
|
13
19
|
OnInteract(): Promise<void>;
|
|
14
20
|
OnChangeScore(score: number): Promise<void>;
|
|
@@ -25,6 +31,9 @@ export declare class GameLifecycle implements GameLifecycleContract {
|
|
|
25
31
|
OnChangeScore(score: number): Promise<void>;
|
|
26
32
|
OnGameEnd(): Promise<void>;
|
|
27
33
|
subscribe(cb: LifecycleFn): void;
|
|
34
|
+
OnGamePause(): Promise<void>;
|
|
35
|
+
OnGameResume(): Promise<void>;
|
|
36
|
+
OnPauseReady(): Promise<void>;
|
|
28
37
|
}
|
|
29
38
|
export declare class GameLifecycleProxy implements GameLifecycleContract {
|
|
30
39
|
private rpcProvider;
|
|
@@ -35,5 +44,8 @@ export declare class GameLifecycleProxy implements GameLifecycleContract {
|
|
|
35
44
|
OnChangeScore(score: number): Promise<void>;
|
|
36
45
|
OnGameEnd(): Promise<void>;
|
|
37
46
|
subscribe(fn: LifecycleFn): void;
|
|
47
|
+
OnGamePause(): Promise<void>;
|
|
48
|
+
OnGameResume(): Promise<void>;
|
|
49
|
+
OnPauseReady(): Promise<void>;
|
|
38
50
|
}
|
|
39
51
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arkadiuminc/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.49",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"main": "dist/pkg/arkadium-sdk.umd.js",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@arkadium/eagle-payments-api-client": "^0.0.35",
|
|
61
|
-
"@arkadium/eagle-user-client": "^0.0.
|
|
61
|
+
"@arkadium/eagle-user-client": "^0.0.89",
|
|
62
62
|
"@arkadium/eagle-virtual-items-api-client": "^0.0.27",
|
|
63
63
|
"@commitlint/cli": "^17.0.3",
|
|
64
64
|
"@commitlint/config-conventional": "^17.0.3",
|