@arkadiuminc/sdk 2.5.0 → 2.6.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.
@@ -0,0 +1,8 @@
1
+ export declare class DisplayAd {
2
+ static getInstance(): DisplayAd;
3
+ protected _scriptLoaded: Promise<void>;
4
+ private ads;
5
+ constructor();
6
+ removeAllAds(): void;
7
+ show(containerId: string, dimensions: number[][]): void;
8
+ }
@@ -1,6 +1,23 @@
1
+ import { ApiEnv } from "../../backend/backend.api";
1
2
  export declare class VideoAd {
2
3
  static getInstance(): VideoAd;
4
+ protected _scriptLoaded: Promise<void>;
5
+ protected timer: any;
3
6
  constructor();
4
- interstitial(): Promise<unknown>;
5
- rewarded(): Promise<unknown>;
7
+ preroll({ duration, env }: {
8
+ duration?: number | undefined;
9
+ env?: ApiEnv | undefined;
10
+ }): Promise<void>;
11
+ interstitial({ duration, env }: {
12
+ duration?: number | undefined;
13
+ env?: ApiEnv | undefined;
14
+ }): Promise<void>;
15
+ rewarded({ duration, env }: {
16
+ duration?: number | undefined;
17
+ env?: ApiEnv | undefined;
18
+ }): Promise<void>;
19
+ protected render({ duration, env }: {
20
+ duration: any;
21
+ env: any;
22
+ }): Promise<void>;
6
23
  }
@@ -0,0 +1 @@
1
+ export {};
@@ -2,6 +2,9 @@ import { RpcProvider } from '../../core/rpc';
2
2
  import { ApiEnv } from '../backend/backend.api';
3
3
  import { Auth } from '../auth/';
4
4
  export interface GameAdsContract {
5
+ showPrerollAd?(options: {
6
+ duration?: number;
7
+ }): Promise<void>;
5
8
  showInterstitialAd(options: {
6
9
  duration?: number;
7
10
  }): Promise<void>;
@@ -28,7 +31,11 @@ export declare enum AdTypes {
28
31
  export declare class GameAds implements GameAdsContract {
29
32
  private interstitial;
30
33
  private rewarded;
34
+ private preroll;
31
35
  constructor(rpcProvider: RpcProvider, auth: Auth);
36
+ showPrerollAd({ duration }: {
37
+ duration?: number;
38
+ }): Promise<void>;
32
39
  showInterstitialAd({ duration }?: {
33
40
  duration?: number | undefined;
34
41
  }): Promise<void>;
@@ -4,6 +4,10 @@ export declare class VideoAd {
4
4
  protected _scriptLoaded: Promise<void>;
5
5
  protected timer: any;
6
6
  constructor();
7
+ preroll({ duration, env }: {
8
+ duration?: number | undefined;
9
+ env?: ApiEnv | undefined;
10
+ }): Promise<void>;
7
11
  interstitial({ duration, env }: {
8
12
  duration?: number | undefined;
9
13
  env?: ApiEnv | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkadiuminc/sdk",
3
- "version": "2.5.0",
3
+ "version": "2.6.0",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "main": "dist/pkg/arkadium-sdk.umd.js",
@@ -38,7 +38,7 @@
38
38
  "precommit": "lint-staged",
39
39
  "release": "standard-version --skip.tag",
40
40
  "ci-release": "standard-version && git push origin && git push origin $(git tag --sort=creatordate | tail -n 1)",
41
- "test:coverage": "jest --collectCoverage --coverageReporters lcov cobertura html --colors",
41
+ "test:coverage": "vitest run --coverage",
42
42
  "prepare": "husky"
43
43
  },
44
44
  "lint-staged": {
@@ -67,6 +67,7 @@
67
67
  "@commitlint/config-conventional": "^17.8.1",
68
68
  "@types/jest": "^29.5.11",
69
69
  "@types/node": "^18.0.6",
70
+ "@vitest/coverage-v8": "^1.6.0",
70
71
  "colors": "^1.4.0",
71
72
  "coveralls": "^3.1.1",
72
73
  "cross-env": "^7.0.3",