@smartico/public-api 0.0.101 → 0.0.102
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/dist/Core/PublicProperties.d.ts +0 -2
- package/dist/WSAPI/WSAPITypes.d.ts +23 -0
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +23 -1
- package/dist/index.modern.mjs.map +1 -1
- package/docs/README.md +1 -0
- package/docs/classes/WSAPI.md +26 -26
- package/docs/interfaces/AchRelatedGame.md +28 -0
- package/docs/interfaces/TMissionOrBadge.md +8 -0
- package/docs/interfaces/TTournamentDetailed.md +10 -2
- package/package.json +1 -1
- package/src/Core/PublicProperties.ts +0 -2
- package/src/Missions/UserAchievement.ts +12 -1
- package/src/Tournaments/GetTournamentInfoResponse.ts +11 -0
- package/src/WSAPI/WSAPITypes.ts +25 -0
|
@@ -2,8 +2,6 @@ export interface PublicProperties {
|
|
|
2
2
|
core_user_language?: string;
|
|
3
3
|
ach_points_balance?: number;
|
|
4
4
|
ach_points_ever?: number;
|
|
5
|
-
ach_points_board_period_type_1?: number;
|
|
6
|
-
ach_points_board_period_type_2?: number;
|
|
7
5
|
ach_level_current_id?: number;
|
|
8
6
|
ach_level_current?: string;
|
|
9
7
|
core_is_test_account?: boolean;
|
|
@@ -206,6 +206,8 @@ export interface TTournament {
|
|
|
206
206
|
* TTournamentDetailed describes the information of the tournament item and includes list of participants, their scores and position in the tournament leaderboard
|
|
207
207
|
*/
|
|
208
208
|
export interface TTournamentDetailed extends TTournament {
|
|
209
|
+
/** List of casino games (or other types of entities) related to the tournament */
|
|
210
|
+
related_games?: AchRelatedGame[];
|
|
209
211
|
/** The list of the tournament participants */
|
|
210
212
|
players?: {
|
|
211
213
|
/** The username of the participant */
|
|
@@ -342,6 +344,27 @@ export interface TMissionOrBadge {
|
|
|
342
344
|
custom_data: any;
|
|
343
345
|
/** The list of tasks of the mission or badge */
|
|
344
346
|
tasks: TMissionOrBadgeTask[];
|
|
347
|
+
/** List of casino games (or other types of entities) related to the mission or badge */
|
|
348
|
+
related_games?: AchRelatedGame[];
|
|
349
|
+
}
|
|
350
|
+
export interface AchRelatedGame {
|
|
351
|
+
/** The ID of the related game */
|
|
352
|
+
ext_game_id: string;
|
|
353
|
+
/** Game public meta information */
|
|
354
|
+
game_public_meta: {
|
|
355
|
+
/** The name of the game */
|
|
356
|
+
name: string;
|
|
357
|
+
/** The URL to the game */
|
|
358
|
+
link: string;
|
|
359
|
+
/** The URL to the image of the game */
|
|
360
|
+
image: string;
|
|
361
|
+
/** The indicator if the game is enabled */
|
|
362
|
+
enabled: boolean;
|
|
363
|
+
/** The list of categories of the game */
|
|
364
|
+
game_categories: string[];
|
|
365
|
+
/** The name of the game provider */
|
|
366
|
+
game_provider: string;
|
|
367
|
+
};
|
|
345
368
|
}
|
|
346
369
|
/**
|
|
347
370
|
* TMissionOrBadgeTask describes the information of tasks that belings to mission or badge. See also TMissionOrBadge
|
package/dist/index.js
CHANGED
|
@@ -635,6 +635,19 @@ var UserAchievementTransform = function UserAchievementTransform(items) {
|
|
|
635
635
|
is_completed: t.isCompleted,
|
|
636
636
|
progress: t.userProgress
|
|
637
637
|
};
|
|
638
|
+
}),
|
|
639
|
+
related_games: (r.related_games || []).map(function (g) {
|
|
640
|
+
return {
|
|
641
|
+
ext_game_id: g.ext_game_id,
|
|
642
|
+
game_public_meta: {
|
|
643
|
+
name: g.game_public_meta.name,
|
|
644
|
+
link: g.game_public_meta.link,
|
|
645
|
+
image: g.game_public_meta.image,
|
|
646
|
+
enabled: g.game_public_meta.enabled,
|
|
647
|
+
game_categories: g.game_public_meta.game_categories,
|
|
648
|
+
game_provider: g.game_public_meta.game_provider
|
|
649
|
+
}
|
|
650
|
+
};
|
|
638
651
|
})
|
|
639
652
|
};
|
|
640
653
|
});
|
|
@@ -736,6 +749,19 @@ var tournamentPrizeTypeToPrizeName = function tournamentPrizeTypeToPrizeName(typ
|
|
|
736
749
|
};
|
|
737
750
|
var tournamentInfoItemTransform = function tournamentInfoItemTransform(t) {
|
|
738
751
|
var response = _extends({}, TournamentItemsTransform([t.tournamentInfo.tournamentLobbyInfo])[0], {
|
|
752
|
+
related_games: (t.tournamentInfo.tournamentLobbyInfo.related_games || []).map(function (g) {
|
|
753
|
+
return {
|
|
754
|
+
ext_game_id: g.ext_game_id,
|
|
755
|
+
game_public_meta: {
|
|
756
|
+
name: g.game_public_meta.name,
|
|
757
|
+
link: g.game_public_meta.link,
|
|
758
|
+
image: g.game_public_meta.image,
|
|
759
|
+
enabled: g.game_public_meta.enabled,
|
|
760
|
+
game_categories: g.game_public_meta.game_categories,
|
|
761
|
+
game_provider: g.game_public_meta.game_provider
|
|
762
|
+
}
|
|
763
|
+
};
|
|
764
|
+
}),
|
|
739
765
|
players: t.tournamentInfo.players.map(function (p) {
|
|
740
766
|
return {
|
|
741
767
|
public_username: p.userAltName,
|