@arkadiuminc/sdk
Advanced tools
Comparing version 0.0.37 to 0.0.38
@@ -31,4 +31,7 @@ declare type RpcRequest = { | ||
export declare function shouldSubscribe(name: string, value: any): boolean; | ||
export declare const rpcPublisher: RpcPublisher; | ||
export declare const rpcSubscriber: RpcSubscriber; | ||
export declare class RpcProvider { | ||
rpcPublisher: RpcPublisher; | ||
rpcSubscriber: RpcSubscriber; | ||
constructor(); | ||
} | ||
export {}; |
@@ -1,18 +0,17 @@ | ||
declare class InterstitialAd { | ||
constructor(); | ||
import { RpcProvider } from '../../core/rpc'; | ||
declare type InterstitialAdContract = { | ||
show(): Promise<void>; | ||
} | ||
declare class RewardedAd { | ||
constructor(); | ||
}; | ||
declare type RewardAdContract = { | ||
show(): Promise<{ | ||
value: number; | ||
}>; | ||
} | ||
}; | ||
export declare class AdsApi { | ||
interstitial: InterstitialAd; | ||
rewarded: RewardedAd; | ||
constructor(interstitial: InterstitialAd, rewarded: RewardedAd); | ||
static getArenaApi(): AdsApi; | ||
static getGameApi(): AdsApi; | ||
interstitial: InterstitialAdContract; | ||
rewarded: RewardAdContract; | ||
constructor(interstitial: InterstitialAdContract, rewarded: RewardAdContract); | ||
static getArenaApi(rpcProvider: RpcProvider): AdsApi; | ||
static getGameApi(rpcProvider: RpcProvider): AdsApi; | ||
} | ||
export {}; |
@@ -0,1 +1,2 @@ | ||
import { RpcProvider } from '../../core/rpc'; | ||
import { GameIdReaderContract } from '../environment/environment.api'; | ||
@@ -15,3 +16,4 @@ interface EnvironmentVersion { | ||
private gameReader; | ||
constructor(gameReader: GameIdReaderContract); | ||
private rpcProvider; | ||
constructor(gameReader: GameIdReaderContract, rpcProvider: RpcProvider); | ||
getEnvVersion(): Promise<EnvironmentVersion>; | ||
@@ -23,2 +25,4 @@ private info; | ||
export declare class AnalyticsApiProxy implements AnalyticsApiContract { | ||
private rpcProvider; | ||
constructor(rpcProvider: RpcProvider); | ||
setGameVersion(v: string): Promise<void>; | ||
@@ -25,0 +29,0 @@ setNestVersion(v: string): Promise<void>; |
@@ -0,1 +1,2 @@ | ||
import { RpcProvider } from '../../core/rpc'; | ||
export interface LocalStorageContract { | ||
@@ -8,3 +9,3 @@ getItem(key: string): Promise<string | null>; | ||
private ls; | ||
constructor(); | ||
constructor(rpcProvider: RpcProvider); | ||
getItem(key: string): Promise<string | null>; | ||
@@ -26,3 +27,3 @@ setItem(key: string, value: string): Promise<void>; | ||
private gameIdOverride; | ||
constructor(); | ||
constructor(rpcProvider: RpcProvider); | ||
readGameId(): Promise<string>; | ||
@@ -32,2 +33,4 @@ setGameId(id: string): void; | ||
export declare class GameIdReaderProxy implements GameIdReaderContract { | ||
private rpcProvider; | ||
constructor(rpcProvider: RpcProvider); | ||
readGameId(): Promise<string>; | ||
@@ -42,5 +45,5 @@ setGameId(id: string): Promise<any>; | ||
constructor(localStorage: LocalStorageContract, cookieStorage: CookieStorageContract, urlParamsReader: UrlParamsReaderContract, gameIdReader: GameIdReaderContract); | ||
static getArenaApi(): EnvironmentApi; | ||
static getGameApi(): EnvironmentApi; | ||
static getArenaApi(rpcProvider: RpcProvider): EnvironmentApi; | ||
static getGameApi(rpcProvider: RpcProvider): EnvironmentApi; | ||
} | ||
export {}; |
@@ -0,1 +1,2 @@ | ||
import { RpcProvider } from '../../core/rpc'; | ||
declare enum LifecycleEvent { | ||
@@ -18,4 +19,5 @@ TEST_READY = 1, | ||
export declare class GameLifecycle implements GameLifecycleContract { | ||
private rpcProvider; | ||
private cb; | ||
constructor(); | ||
constructor(rpcProvider: RpcProvider); | ||
OnTestReady(): Promise<void>; | ||
@@ -29,2 +31,4 @@ OnGameStart(): Promise<void>; | ||
export declare class GameLifecycleProxy implements GameLifecycleContract { | ||
private rpcProvider; | ||
constructor(rpcProvider: RpcProvider); | ||
OnTestReady(): Promise<void>; | ||
@@ -31,0 +35,0 @@ OnGameStart(): Promise<void>; |
@@ -0,1 +1,2 @@ | ||
import { RpcProvider } from '../../core/rpc'; | ||
import { GameIdReaderContract } from '../environment/environment.api'; | ||
@@ -21,2 +22,3 @@ import { BackendApi } from '../backend/backend.api'; | ||
export declare class GameStateApi { | ||
private rpcProvider; | ||
private ls; | ||
@@ -28,3 +30,3 @@ private backendApi; | ||
private useGameSerializer; | ||
constructor(backendApi: BackendApi, gameIdReader: GameIdReaderContract); | ||
constructor(backendApi: BackendApi, gameIdReader: GameIdReaderContract, rpcProvider: RpcProvider); | ||
private getGameId; | ||
@@ -47,3 +49,4 @@ private packData; | ||
export declare class GameStateApiProxy { | ||
constructor(); | ||
private rpcProvider; | ||
constructor(rpcProvider: RpcProvider); | ||
private serializer; | ||
@@ -50,0 +53,0 @@ setSerializer(serializer: Serializer | null): void; |
import { BackendApi } from '../backend/backend.api'; | ||
import { createStore } from '../../utils/observable'; | ||
import { RpcProvider } from '../../core/rpc'; | ||
interface Image { | ||
@@ -27,5 +28,5 @@ png: string; | ||
constructor(userProfileReader: UserProfileReaderContract, authUIManager: AuthUIManagerContract); | ||
static getArenaApi(backendApi: BackendApi): UserStateApi; | ||
static getGameApi(backendApi: BackendApi): UserStateApi; | ||
static getArenaApi(backendApi: BackendApi, rpcProvider: RpcProvider): UserStateApi; | ||
static getGameApi(backendApi: BackendApi, rpcProvider: RpcProvider): UserStateApi; | ||
} | ||
export {}; |
@@ -5,2 +5,3 @@ import { ApiEnv, BackendApi, SessionStorageType } from './api/features/backend/backend.api'; | ||
import { EnvironmentApi } from './api/features/environment/environment.api'; | ||
import { RpcProvider } from './api/core/rpc'; | ||
import { AdsApi } from './api/features/ads/'; | ||
@@ -11,2 +12,3 @@ import { UserStateApi } from './api/features/user-state/user-state.api'; | ||
export declare class ArkadiumGameSdk { | ||
private rpcProvider; | ||
backendApi: BackendApi; | ||
@@ -22,3 +24,3 @@ environment: EnvironmentApi; | ||
$pingNotification: Observable<number>; | ||
constructor(backendApi: BackendApi, environment: EnvironmentApi, gameState: GameStateContract, lifecycle: GameLifecycleContract, ads: AdsApi, userStateApi: UserStateApi, analytics: AnalyticsApiContract); | ||
constructor(rpcProvider: RpcProvider, backendApi: BackendApi, environment: EnvironmentApi, gameState: GameStateContract, lifecycle: GameLifecycleContract, ads: AdsApi, userStateApi: UserStateApi, analytics: AnalyticsApiContract); | ||
initialize(env: ApiEnv, isGameSide: boolean, sessionStorage?: SessionStorageType | null): Promise<void>; | ||
@@ -25,0 +27,0 @@ updateWinReference(target: any): void; |
@@ -8,3 +8,5 @@ import { ApiEnv, BackendApi, SessionStorageType } from './api/features/backend/backend.api'; | ||
import { AnalyticsApiContract } from './api/features/analytics/analytics.api'; | ||
import { RpcProvider } from './api/core/rpc'; | ||
export declare class ArkadiumGameSdk { | ||
private rpcProvider; | ||
backendApi: BackendApi; | ||
@@ -19,3 +21,3 @@ environment: EnvironmentApi; | ||
private arenaPingListener; | ||
constructor(backendApi: BackendApi, environment: EnvironmentApi, gameState: GameStateContract, lifecycle: GameLifecycleContract, ads: AdsApi, userStateApi: UserStateApi, analytics: AnalyticsApiContract); | ||
constructor(rpcProvider: RpcProvider, backendApi: BackendApi, environment: EnvironmentApi, gameState: GameStateContract, lifecycle: GameLifecycleContract, ads: AdsApi, userStateApi: UserStateApi, analytics: AnalyticsApiContract); | ||
initialize(env: ApiEnv, isGameSide: boolean, sessionStorage?: SessionStorageType | null): Promise<void>; | ||
@@ -22,0 +24,0 @@ updateWinReference(target: any): void; |
@@ -0,3 +1,4 @@ | ||
import { RpcProvider } from './api/core/rpc'; | ||
export declare class PingModule { | ||
constructor(); | ||
constructor(rpcProvider: RpcProvider); | ||
$ping: import("./api/utils/observable").Observable<number>; | ||
@@ -7,3 +8,5 @@ ping(): boolean; | ||
export declare class PingModuleProxy { | ||
private rpcProvider; | ||
constructor(rpcProvider: RpcProvider); | ||
ping(): Promise<any>; | ||
} |
{ | ||
"name": "@arkadiuminc/sdk", | ||
"version": "0.0.37", | ||
"version": "0.0.38", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21446
412