@arkadiuminc/sdk 2.44.0 → 2.45.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,33 @@
|
|
|
1
|
+
import { ApiEnv } from '../backend/backend.api';
|
|
2
|
+
import { IHost } from '../host';
|
|
3
|
+
import { Auth } from '../auth';
|
|
4
|
+
import { PersistenceArena } from '../persistence';
|
|
5
|
+
|
|
6
|
+
export declare type UserRating = {
|
|
7
|
+
vote: number;
|
|
8
|
+
gameId: string;
|
|
9
|
+
};
|
|
10
|
+
export declare type GameRating = {
|
|
11
|
+
upVotes: number;
|
|
12
|
+
downVotes: number;
|
|
13
|
+
totalVotes: number;
|
|
14
|
+
};
|
|
15
|
+
export declare class RatingsArena {
|
|
16
|
+
private host;
|
|
17
|
+
private auth;
|
|
18
|
+
private persistence;
|
|
19
|
+
private isInited;
|
|
20
|
+
private ratingsEndpoint;
|
|
21
|
+
private arenaDomain;
|
|
22
|
+
private _isSupported;
|
|
23
|
+
constructor(host: IHost, auth: Auth, persistence: PersistenceArena);
|
|
24
|
+
init(env: ApiEnv): Promise<void>;
|
|
25
|
+
isSupported(): Promise<boolean>;
|
|
26
|
+
upvoteGame(gameId?: string, captchaToken?: string, captchaMode?: string): Promise<void>;
|
|
27
|
+
downvoteGame(gameId?: string, captchaToken?: string, captchaMode?: string): Promise<void>;
|
|
28
|
+
removeGameVote(gameId?: string, captchaToken?: string, captchaMode?: string): Promise<void>;
|
|
29
|
+
private getUserInfo;
|
|
30
|
+
private postUserRating;
|
|
31
|
+
getUserRating(gameId?: string): Promise<UserRating>;
|
|
32
|
+
getGameRating(gameId?: string): Promise<GameRating>;
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -14,6 +14,7 @@ import { LeaderboardArena } from './api/features/leaderboard';
|
|
|
14
14
|
import { FriendsArena } from './api/features/friends';
|
|
15
15
|
import { NotificationsArena } from './api/features/notifications';
|
|
16
16
|
import { ChatArena } from './api/features/chat';
|
|
17
|
+
import { RatingsArena } from './api/features/ratings';
|
|
17
18
|
|
|
18
19
|
import * as MockUserUtils from './api/utils/mockUser';
|
|
19
20
|
/** @hidden */
|
|
@@ -33,13 +34,14 @@ export declare class ArkadiumArenaSdk {
|
|
|
33
34
|
friends: FriendsArena;
|
|
34
35
|
notifications: NotificationsArena;
|
|
35
36
|
chats: ChatArena;
|
|
37
|
+
ratings: RatingsArena;
|
|
36
38
|
private currentEnv;
|
|
37
39
|
private currentTarget;
|
|
38
40
|
private gamePingSender;
|
|
39
41
|
private gamePingListener;
|
|
40
42
|
$pingNotification: Observable<number>;
|
|
41
43
|
version: string;
|
|
42
|
-
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);
|
|
44
|
+
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);
|
|
43
45
|
setEnv(e: ApiEnv): void;
|
|
44
46
|
initialize(env: ApiEnv, isGameSide: boolean, sessionStorage?: SessionStorageType | null): Promise<void>;
|
|
45
47
|
private envDiscoverListener;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arkadiuminc/sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.45.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"main": "dist/pkg/arkadium-sdk.umd.js",
|
|
@@ -102,6 +102,7 @@
|
|
|
102
102
|
"ajv-formats": "^3.0.1",
|
|
103
103
|
"jsonpack": "^1.1.5",
|
|
104
104
|
"nanoid": "^5.0.4",
|
|
105
|
+
"uuid": "^11.1.0",
|
|
105
106
|
"vite-plugin-string-replace": "^1.1.2"
|
|
106
107
|
},
|
|
107
108
|
"standard-version": {
|