@smartico/public-api 0.0.97 → 0.0.98

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartico/public-api",
3
- "version": "0.0.97",
3
+ "version": "0.0.98",
4
4
  "description": "Smartico public API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -0,0 +1,14 @@
1
+ interface AchRelatedGame {
2
+ ach_game_id: number;
3
+ ext_game_id: string;
4
+ game_public_meta: {
5
+ name: string;
6
+ link: string;
7
+ image: string;
8
+ enabled: boolean;
9
+ game_categories?: string[];
10
+ game_provider?: string;
11
+ }
12
+ }
13
+
14
+ export { AchRelatedGame }
@@ -2,7 +2,7 @@
2
2
  class CoreUtils {
3
3
 
4
4
  public static avatarUrl = (avatar_id: string, avatarDomain: string): string => {
5
- if (avatar_id !== null && avatar_id !== undefined && !(avatar_id.startsWith && avatar_id.startsWith('http'))) {
5
+ if (avatarDomain && avatar_id !== null && avatar_id !== undefined && !(avatar_id.startsWith && avatar_id.startsWith('http'))) {
6
6
  if (avatarDomain.endsWith('/')) {
7
7
  return avatarDomain.slice(0, -1) + '/avatar/' + avatar_id
8
8
  } else {
@@ -1,4 +1,5 @@
1
1
 
2
+ import { AchRelatedGame } from "../Base/AchRelatedGame";
2
3
  import { IntUtils } from "../IntUtils";
3
4
  import { TMissionOrBadge } from "../WSAPI/WSAPITypes";
4
5
  import { AchievementPublicMeta } from "./AchievementPublicMeta";
@@ -27,6 +28,7 @@ export interface UserAchievement {
27
28
  achievementTasks?: UserAchievementTask[];
28
29
  ach_status_id?: AchievementStatus;
29
30
  scheduledMissionType?: ScheduledMissionType;
31
+ related_games?: AchRelatedGame[];
30
32
  }
31
33
 
32
34
  export const UserAchievementTransform = (items: UserAchievement[]): TMissionOrBadge[] => {
@@ -6,6 +6,7 @@ import { TournamentPublicMeta } from "./TournamentPublicMeta";
6
6
  import { TTournament } from "../WSAPI/WSAPITypes";
7
7
  import { TournamentUtils } from ".";
8
8
  import { IntUtils } from "../IntUtils";
9
+ import { AchRelatedGame } from "../Base/AchRelatedGame";
9
10
 
10
11
  export interface Tournament {
11
12
 
@@ -49,6 +50,9 @@ export interface Tournament {
49
50
  playersMaxCount?: number;
50
51
  /** Tournament duration in millisecnnds */
51
52
  durationMs?: number;
53
+
54
+ /** List of casino games (or other types of entities) related to the tournament */
55
+ related_games?: AchRelatedGame[];
52
56
  }
53
57
 
54
58