@arkadiuminc/sdk 0.0.29 → 0.0.30
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.
|
@@ -11,18 +11,8 @@ export declare class BackendApi {
|
|
|
11
11
|
private virtualItemApiGateway;
|
|
12
12
|
private userGateway;
|
|
13
13
|
userGameData: UserGameDataApi | null;
|
|
14
|
-
uiOpenRequest:
|
|
15
|
-
|
|
16
|
-
value: boolean;
|
|
17
|
-
subscribe: (observer: import("../../utils/observable").ObserverFn<boolean>) => void;
|
|
18
|
-
update(newValue: boolean): void;
|
|
19
|
-
};
|
|
20
|
-
authStatus: {
|
|
21
|
-
observers: import("../../utils/observable").ObserverFn<boolean>[];
|
|
22
|
-
value: boolean;
|
|
23
|
-
subscribe: (observer: import("../../utils/observable").ObserverFn<boolean>) => void;
|
|
24
|
-
update(newValue: boolean): void;
|
|
25
|
-
};
|
|
14
|
+
uiOpenRequest: import("../../utils/observable").Observable<boolean>;
|
|
15
|
+
authStatus: import("../../utils/observable").Observable<boolean>;
|
|
26
16
|
addEventListener(event: number, cb: () => void): void;
|
|
27
17
|
init(e: ApiEnv, isGameSide: boolean, sessionStorage?: SessionStorageType | null): Promise<void>;
|
|
28
18
|
checkAuth(): void;
|
|
@@ -5,12 +5,8 @@ export interface ReadonlyObservable<T> {
|
|
|
5
5
|
export declare class Observable<T> {
|
|
6
6
|
private lastValue;
|
|
7
7
|
private observers;
|
|
8
|
+
constructor(initialValue: T);
|
|
8
9
|
subscribe(observer: ObserverFn<T>): () => void;
|
|
9
|
-
|
|
10
|
+
update(data: T): void;
|
|
10
11
|
}
|
|
11
|
-
export declare function createStore<T>(initialValue: T):
|
|
12
|
-
observers: ObserverFn<T>[];
|
|
13
|
-
value: T;
|
|
14
|
-
subscribe: (observer: ObserverFn<T>) => void;
|
|
15
|
-
update(newValue: T): void;
|
|
16
|
-
};
|
|
12
|
+
export declare function createStore<T>(initialValue: T): Observable<T>;
|
|
@@ -5,6 +5,7 @@ import { EnvironmentApi } from './api/features/environment/environment.api';
|
|
|
5
5
|
import { AdsApi } from './api/features/ads/';
|
|
6
6
|
import { UserStateApi } from './api/features/user-state/user-state.api';
|
|
7
7
|
import { AnalyticsApiContract } from './api/features/analytics/analytics.api';
|
|
8
|
+
import { Observable } from './api/utils/observable';
|
|
8
9
|
export declare class ArkadiumGameSdk {
|
|
9
10
|
backendApi: BackendApi;
|
|
10
11
|
environment: EnvironmentApi;
|
|
@@ -13,10 +14,14 @@ export declare class ArkadiumGameSdk {
|
|
|
13
14
|
ads: AdsApi;
|
|
14
15
|
userStateApi: UserStateApi;
|
|
15
16
|
analytics: AnalyticsApiContract;
|
|
17
|
+
private gamePingSender;
|
|
18
|
+
private gamePingListener;
|
|
19
|
+
$pingNotification: Observable<number>;
|
|
16
20
|
constructor(backendApi: BackendApi, environment: EnvironmentApi, gameState: GameStateContract, lifecycle: GameLifecycleContract, ads: AdsApi, userStateApi: UserStateApi, analytics: AnalyticsApiContract);
|
|
17
21
|
initialize(env: ApiEnv, isGameSide: boolean, sessionStorage?: SessionStorageType | null): Promise<void>;
|
|
18
22
|
updateWinReference(target: any): void;
|
|
19
23
|
debugMode(enabled: boolean): void;
|
|
24
|
+
ping(): Promise<any>;
|
|
20
25
|
}
|
|
21
26
|
export { ApiEnv };
|
|
22
27
|
export declare class GameApi {
|
|
@@ -13,6 +13,8 @@ export declare class ArkadiumGameSdk {
|
|
|
13
13
|
ads: AdsApi;
|
|
14
14
|
userStateApi: UserStateApi;
|
|
15
15
|
analytics: AnalyticsApiContract;
|
|
16
|
+
private arenaPingSender;
|
|
17
|
+
private arenaPingListener;
|
|
16
18
|
constructor(backendApi: BackendApi, environment: EnvironmentApi, gameState: GameStateContract, lifecycle: GameLifecycleContract, ads: AdsApi, userStateApi: UserStateApi, analytics: AnalyticsApiContract);
|
|
17
19
|
initialize(env: ApiEnv, isGameSide: boolean, sessionStorage?: SessionStorageType | null): Promise<void>;
|
|
18
20
|
updateWinReference(target: any): void;
|