@arkadiuminc/sdk 2.49.0 → 2.51.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,31 @@
|
|
|
1
|
+
import { RpcProvider } from '../../core/rpc';
|
|
2
|
+
import { GameLifecycleGame } from '../game-lifecycle/game-lifecycle.api';
|
|
3
|
+
|
|
4
|
+
declare type RecordedCommand = {
|
|
5
|
+
type: 'pointerdown' | 'keydown' | 'scroll' | 'pointermove' | 'pointerup';
|
|
6
|
+
timestamp: number;
|
|
7
|
+
key?: string;
|
|
8
|
+
x?: number;
|
|
9
|
+
y?: number;
|
|
10
|
+
};
|
|
11
|
+
export declare class RecorderArena {
|
|
12
|
+
private rpcProvider;
|
|
13
|
+
constructor(rpcProvider: RpcProvider);
|
|
14
|
+
startCapturing(): Promise<void>;
|
|
15
|
+
stopCapturing(): Promise<void>;
|
|
16
|
+
playCommands(commands: RecordedCommand[]): Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
export declare class RecorderGame {
|
|
19
|
+
private rpcProvider;
|
|
20
|
+
private lifecycle;
|
|
21
|
+
private _inputFocused;
|
|
22
|
+
private _isCapturing;
|
|
23
|
+
private _scrollEndListener;
|
|
24
|
+
private _pointerMoveListener;
|
|
25
|
+
private _pointerUpListener;
|
|
26
|
+
constructor(rpcProvider: RpcProvider, lifecycle: GameLifecycleGame);
|
|
27
|
+
startCapturing(): Promise<void>;
|
|
28
|
+
stopCapturing(): Promise<void>;
|
|
29
|
+
private playCommands;
|
|
30
|
+
}
|
|
31
|
+
export {};
|
|
@@ -14,8 +14,11 @@ export declare class WalletArena implements Wallet {
|
|
|
14
14
|
private virtualItemGateway;
|
|
15
15
|
private currencySku;
|
|
16
16
|
private isInited;
|
|
17
|
+
private _isGemsSupported;
|
|
17
18
|
constructor(backendApi: Backend, lifecycle: GameLifecycleArena, rpcProvider: RpcProvider);
|
|
18
19
|
init(env: ApiEnv): Promise<void>;
|
|
20
|
+
setGemsSupported(isSupported: boolean): void;
|
|
21
|
+
private isGemsSupported;
|
|
19
22
|
/**
|
|
20
23
|
* Allows querying for the wallet balance
|
|
21
24
|
* @returns the amount of gems in the user wallet
|
|
@@ -42,4 +45,5 @@ export declare class WalletGame implements Wallet {
|
|
|
42
45
|
* @returns true if the spending of the gem amount was successful, false otherwise
|
|
43
46
|
*/
|
|
44
47
|
consumeGems(amount: number): Promise<boolean>;
|
|
48
|
+
isGemsSupported(): Promise<boolean>;
|
|
45
49
|
}
|
|
@@ -16,6 +16,7 @@ import { NotificationsArena } from './api/features/notifications';
|
|
|
16
16
|
import { ChatArena } from './api/features/chat';
|
|
17
17
|
import { RatingsArena } from './api/features/ratings';
|
|
18
18
|
import { TournamentsArena } from './api/features/tournaments';
|
|
19
|
+
import { RecorderArena } from './api/features/recorder';
|
|
19
20
|
|
|
20
21
|
import * as MockUserUtils from './api/utils/mockUser';
|
|
21
22
|
/** @hidden */
|
|
@@ -37,13 +38,14 @@ export declare class ArkadiumArenaSdk {
|
|
|
37
38
|
chats: ChatArena;
|
|
38
39
|
ratings: RatingsArena;
|
|
39
40
|
tournaments: TournamentsArena;
|
|
41
|
+
recorder: RecorderArena;
|
|
40
42
|
private currentEnv;
|
|
41
43
|
private currentTarget;
|
|
42
44
|
private gamePingSender;
|
|
43
45
|
private gamePingListener;
|
|
44
46
|
$pingNotification: Observable<number>;
|
|
45
47
|
version: string;
|
|
46
|
-
constructor(backendApi: Backend, host: HostArena, lifecycle: GameLifecycleArena, ads: AdsArena, auth: AuthArena, analytics: AnalyticsApiContract, timeoutTester: TimeoutTesterContract, persistence: PersistenceArena, wallet: WalletArena, debug: DebugProviderArena, supportV1: SupportV1, leaderboard: LeaderboardArena, friends: FriendsArena, notifications: NotificationsArena, chats: ChatArena, ratings: RatingsArena, tournaments: TournamentsArena);
|
|
48
|
+
constructor(backendApi: Backend, host: HostArena, lifecycle: GameLifecycleArena, ads: AdsArena, auth: AuthArena, analytics: AnalyticsApiContract, timeoutTester: TimeoutTesterContract, persistence: PersistenceArena, wallet: WalletArena, debug: DebugProviderArena, supportV1: SupportV1, leaderboard: LeaderboardArena, friends: FriendsArena, notifications: NotificationsArena, chats: ChatArena, ratings: RatingsArena, tournaments: TournamentsArena, recorder: RecorderArena);
|
|
47
49
|
setEnv(e: ApiEnv): void;
|
|
48
50
|
initialize(env: ApiEnv, isGameSide: boolean, sessionStorage?: SessionStorageType | null): Promise<void>;
|
|
49
51
|
private envDiscoverListener;
|
|
@@ -10,6 +10,7 @@ import { Wallet, WalletGame } from './api/features/wallet';
|
|
|
10
10
|
import { HostGame } from './api/features/host';
|
|
11
11
|
import { LeaderboardGame } from './api/features/leaderboard';
|
|
12
12
|
import { TournamentsGame } from './api/features/tournaments';
|
|
13
|
+
import { RecorderGame } from './api/features/recorder';
|
|
13
14
|
|
|
14
15
|
export declare class ArkadiumGameSdk {
|
|
15
16
|
version: string;
|
|
@@ -28,7 +29,7 @@ export declare class ArkadiumGameSdk {
|
|
|
28
29
|
wallet: Wallet;
|
|
29
30
|
leaderboard: LeaderboardGame;
|
|
30
31
|
tournaments: TournamentsGame;
|
|
31
|
-
constructor({ rpcProvider, backendApi, host, lifecycle, ads, auth, analytics, timeoutTester, persistence, wallet, leaderboard, tournaments }: {
|
|
32
|
+
constructor({ rpcProvider, backendApi, host, lifecycle, ads, auth, analytics, timeoutTester, persistence, wallet, leaderboard, tournaments, recorder }: {
|
|
32
33
|
rpcProvider: RpcProvider;
|
|
33
34
|
backendApi: Backend;
|
|
34
35
|
host: HostGame;
|
|
@@ -41,6 +42,7 @@ export declare class ArkadiumGameSdk {
|
|
|
41
42
|
wallet: WalletGame;
|
|
42
43
|
leaderboard: LeaderboardGame;
|
|
43
44
|
tournaments: TournamentsGame;
|
|
45
|
+
recorder: RecorderGame;
|
|
44
46
|
});
|
|
45
47
|
initialize(env: ApiEnv, isGameSide: boolean): Promise<void>;
|
|
46
48
|
getEnv(): ApiEnv;
|