@arkadiuminc/sdk 2.18.1 → 2.19.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.
|
@@ -1,9 +1,31 @@
|
|
|
1
|
+
export declare type BannerAdOptions = {
|
|
2
|
+
id: string;
|
|
3
|
+
dimensions: AdTypes[];
|
|
4
|
+
dataId?: string;
|
|
5
|
+
product?: string;
|
|
6
|
+
onAdShow?: () => void;
|
|
7
|
+
};
|
|
8
|
+
export declare enum AdTypes {
|
|
9
|
+
AD_300x250 = "AD_300x250",
|
|
10
|
+
AD_250x250 = "AD_250x250",
|
|
11
|
+
AD_336x280 = "AD_336x280",
|
|
12
|
+
AD_300x600 = "AD_300x600",
|
|
13
|
+
AD_728x90 = "AD_728x90",
|
|
14
|
+
AD_768x90 = "AD_768x90",
|
|
15
|
+
AD_970x90 = "AD_970x90",
|
|
16
|
+
AD_970x250 = "AD_970x250",
|
|
17
|
+
AD_320x50 = "AD_320x50",
|
|
18
|
+
AD_320x100 = "AD_320x100",
|
|
19
|
+
AD_468x60 = "AD_468x60",
|
|
20
|
+
AD_160x600 = "AD_160x600"
|
|
21
|
+
}
|
|
1
22
|
/** @hidden */
|
|
2
23
|
export declare class DisplayAd {
|
|
3
24
|
static getInstance(): DisplayAd;
|
|
4
25
|
protected _scriptLoaded: Promise<void>;
|
|
5
26
|
private ads;
|
|
6
27
|
constructor();
|
|
28
|
+
private matchAdSize;
|
|
7
29
|
removeAllAds(): void;
|
|
8
|
-
show(
|
|
30
|
+
show(options: BannerAdOptions): void;
|
|
9
31
|
}
|
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
export declare type BannerAdOptions = {
|
|
2
|
+
id: string;
|
|
3
|
+
dimensions: AdTypes[];
|
|
4
|
+
dataId?: string;
|
|
5
|
+
product?: string;
|
|
6
|
+
onAdShow?: () => void;
|
|
7
|
+
};
|
|
8
|
+
export declare enum AdTypes {
|
|
9
|
+
AD_300x250 = "AD_300x250",
|
|
10
|
+
AD_250x250 = "AD_250x250",
|
|
11
|
+
AD_336x280 = "AD_336x280",
|
|
12
|
+
AD_300x600 = "AD_300x600",
|
|
13
|
+
AD_728x90 = "AD_728x90",
|
|
14
|
+
AD_768x90 = "AD_768x90",
|
|
15
|
+
AD_970x90 = "AD_970x90",
|
|
16
|
+
AD_970x250 = "AD_970x250",
|
|
17
|
+
AD_320x50 = "AD_320x50",
|
|
18
|
+
AD_320x100 = "AD_320x100",
|
|
19
|
+
AD_468x60 = "AD_468x60",
|
|
20
|
+
AD_160x600 = "AD_160x600"
|
|
21
|
+
}
|
|
1
22
|
/** @hidden */
|
|
2
23
|
export declare class DisplayAd {
|
|
3
24
|
static domain: string;
|
|
@@ -5,6 +26,7 @@ export declare class DisplayAd {
|
|
|
5
26
|
protected _scriptLoaded: Promise<void>;
|
|
6
27
|
private ads;
|
|
7
28
|
constructor(domain: string);
|
|
29
|
+
private matchAdSize;
|
|
8
30
|
removeAllAds(): void;
|
|
9
|
-
show(
|
|
31
|
+
show(options: BannerAdOptions): void;
|
|
10
32
|
}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { RpcProvider } from '../../core/rpc';
|
|
2
2
|
import { ApiEnv } from '../backend/backend.api';
|
|
3
3
|
import { Auth } from '../auth/';
|
|
4
|
+
import { BannerAdOptions, AdTypes } from './display-ad';
|
|
4
5
|
|
|
5
6
|
/** @hidden */
|
|
6
|
-
export interface
|
|
7
|
+
export interface AdsArena extends Ads, AdsArenaBanner {
|
|
8
|
+
}
|
|
9
|
+
export interface AdsGame extends Ads, AdsGameBanner {
|
|
10
|
+
}
|
|
11
|
+
interface Ads {
|
|
7
12
|
showPrerollAd?(options: {
|
|
8
13
|
duration?: number;
|
|
9
14
|
}): Promise<void>;
|
|
@@ -15,23 +20,16 @@ export interface GameAdsContract {
|
|
|
15
20
|
}): Promise<{
|
|
16
21
|
value: number;
|
|
17
22
|
}>;
|
|
18
|
-
showBannerAd?(adId: string, dimensions: AdTypes[]): any;
|
|
19
23
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
AD_728x90 = "AD_728x90",
|
|
26
|
-
AD_970x90 = "AD_970x90",
|
|
27
|
-
AD_970x250 = "AD_970x250",
|
|
28
|
-
AD_320x50 = "AD_320x50",
|
|
29
|
-
AD_320x100 = "AD_320x100",
|
|
30
|
-
AD_468x60 = "AD_468x60",
|
|
31
|
-
AD_160x600 = "AD_160x600"
|
|
24
|
+
interface AdsArenaBanner {
|
|
25
|
+
showBannerAd?(options: BannerAdOptions): any;
|
|
26
|
+
}
|
|
27
|
+
interface AdsGameBanner {
|
|
28
|
+
showBannerAd?(adId: string, dimensions: AdTypes[]): any;
|
|
32
29
|
}
|
|
33
30
|
/** @hidden */
|
|
34
|
-
export declare class
|
|
31
|
+
export declare class AdsArenaProvider implements AdsArena {
|
|
32
|
+
bannerSizes: typeof AdTypes;
|
|
35
33
|
private interstitial;
|
|
36
34
|
private rewarded;
|
|
37
35
|
private preroll;
|
|
@@ -50,8 +48,9 @@ export declare class GameAds implements GameAdsContract {
|
|
|
50
48
|
}): Promise<{
|
|
51
49
|
value: number;
|
|
52
50
|
}>;
|
|
51
|
+
showBannerAd(options: BannerAdOptions): any;
|
|
53
52
|
}
|
|
54
|
-
export declare class
|
|
53
|
+
export declare class AdsGameProvider implements AdsGame {
|
|
55
54
|
bannerSizes: typeof AdTypes;
|
|
56
55
|
private interstitial;
|
|
57
56
|
private rewarded;
|
|
@@ -67,3 +66,4 @@ export declare class GameAdsProxy implements GameAdsContract {
|
|
|
67
66
|
}>;
|
|
68
67
|
showBannerAd(adId: string, dimensions: AdTypes[]): any;
|
|
69
68
|
}
|
|
69
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ApiEnv, Backend, SessionStorageType } from './api/features/backend/backend.api';
|
|
2
2
|
import { GameLifecycleContract } from './api/features/game-lifecycle/game-lifecycle.api';
|
|
3
3
|
import { RpcProvider } from './api/core/rpc';
|
|
4
|
-
import {
|
|
4
|
+
import { AdsArena } from './api/features/ads/';
|
|
5
5
|
import { Auth } from './api/features/auth/';
|
|
6
6
|
import { AnalyticsApiContract } from './api/features/analytics/analytics.api';
|
|
7
7
|
import { Observable } from './api/utils/observable';
|
|
@@ -15,7 +15,7 @@ export declare class ArkadiumArenaSdk {
|
|
|
15
15
|
backendApi: Backend;
|
|
16
16
|
host: HostArena;
|
|
17
17
|
lifecycle: GameLifecycleContract;
|
|
18
|
-
ads:
|
|
18
|
+
ads: AdsArena;
|
|
19
19
|
auth: Auth;
|
|
20
20
|
analytics: AnalyticsApiContract;
|
|
21
21
|
private timeoutTester;
|
|
@@ -26,7 +26,7 @@ export declare class ArkadiumArenaSdk {
|
|
|
26
26
|
private gamePingListener;
|
|
27
27
|
$pingNotification: Observable<number>;
|
|
28
28
|
version: string;
|
|
29
|
-
constructor(rpcProvider: RpcProvider, backendApi: Backend, host: HostArena, lifecycle: GameLifecycleContract, ads:
|
|
29
|
+
constructor(rpcProvider: RpcProvider, backendApi: Backend, host: HostArena, lifecycle: GameLifecycleContract, ads: AdsArena, auth: Auth, analytics: AnalyticsApiContract, timeoutTester: TimeoutTesterContract, persistence: PersistenceArena);
|
|
30
30
|
setEnv(e: ApiEnv): void;
|
|
31
31
|
initialize(env: ApiEnv, isGameSide: boolean, sessionStorage?: SessionStorageType | null): Promise<void>;
|
|
32
32
|
private envDiscoverListener;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApiEnv, Backend } from './api/features/backend/backend.api';
|
|
2
2
|
import { GameLifecycleContract } from './api/features/game-lifecycle/game-lifecycle.api';
|
|
3
|
-
import {
|
|
3
|
+
import { AdsGame } from './api/features/ads/';
|
|
4
4
|
import { Auth } from './api/features/auth/';
|
|
5
5
|
import { AnalyticsApiContract } from './api/features/analytics/analytics.api';
|
|
6
6
|
import { RpcProvider } from './api/core/rpc';
|
|
@@ -18,7 +18,7 @@ export declare class ArkadiumGameSdk {
|
|
|
18
18
|
private backendApi;
|
|
19
19
|
host: HostGame;
|
|
20
20
|
lifecycle: GameLifecycleContract;
|
|
21
|
-
ads:
|
|
21
|
+
ads: AdsGame;
|
|
22
22
|
auth: Auth;
|
|
23
23
|
analytics: AnalyticsApiContract;
|
|
24
24
|
private timeoutTester;
|
|
@@ -29,7 +29,7 @@ export declare class ArkadiumGameSdk {
|
|
|
29
29
|
backendApi: Backend;
|
|
30
30
|
host: HostGame;
|
|
31
31
|
lifecycle: GameLifecycleContract;
|
|
32
|
-
ads:
|
|
32
|
+
ads: AdsGame;
|
|
33
33
|
auth: Auth;
|
|
34
34
|
analytics: AnalyticsApiContract;
|
|
35
35
|
timeoutTester: TimeoutTesterContract;
|